eaplatanios / tensorflow_scala

TensorFlow API for the Scala Programming Language
http://platanios.org/tensorflow_scala/
Apache License 2.0
937 stars 95 forks source link

is there a equivalent of tf.image.decode_jpeg #32

Closed sujitbiswas closed 6 years ago

sujitbiswas commented 6 years ago

@eaplatanios is there a equivalent of tf.image.decode_jpeg or how can we directly use Op.Builder?

eaplatanios commented 6 years ago

@sujitbiswas Sorry for the late reply but I have been very busy with a paper deadline. I haven't currently implemented an interface to tf.image.decode_jpeg but I will add one as soon as I get the chance. In general, to use the Op.Builder class, you can look into the following:

Even though it may sound like a lot of steps you usually end up with 3-4 lines of code for each op.

You can also look in my classes for reference in how to add gradients for your ops, if you need to. I'm sorry this is not documented thus far, but I haven't gotten the chance yet. I'll do so when I find time, but I would also find it really helpful if you wrote a small piece with your experience trying to implement support for ops in my library (if you end up giving it a shot), because I would probably not be aware of all issues that may came up. A fresh opinion is always useful. :)