tfjs-core icon indicating copy to clipboard operation
tfjs-core copied to clipboard

tf.image.transform no-shader implementation

Open piercus opened this issue 5 years ago • 0 comments

This PR aims to fix tensorflow/tfjs#1426 and replaces #1637

After trying to implement specific webgl/cpu shaders in #1637 i realized ImageProjectiveTransform is not available in the ops list of C API.

Considering this, I've implemented it in a no-shader way, using tf.gatherND as the cornerstone of the implementation.

This new version won't need to maintain multiple shaders but may be a little bit slower (i haven't fully tested the performance yet)

Since the implementation takes 300 lines, i have put it into a separated file required in image_ops.ts.

Please share your feedbacks and suggestions :-)


This change is Reviewable

piercus avatar Mar 21 '19 11:03 piercus