{"action":"created","issue":{"url":"https://api.github.com/repos/eaplatanios/tensorflow_scala/issues/32","repository_url":"https://api.github.com/repos/eaplatanios/tensorflow_scala","labels_url":"https://api.github.com/repos/eaplatanios/tensorflow_scala/issues/32/labels{/name}","comments_url":"https://api.github.com/repos/eaplatanios/tensorflow_scala/issues/32/comments","events_url":"https://api.github.com/repos/eaplatanios/tensorflow_scala/issues/32/events","html_url":"https://github.com/eaplatanios/tensorflow_scala/issues/32","id":268284751,"number":32,"title":"is there a equivalent of tf.image.decode_jpeg","user":{"login":"sujitbiswas","id":5131617,"avatar_url":"https://avatars3.githubusercontent.com/u/5131617?v=4","gravatar_id":"","url":"https://api.github.com/users/sujitbiswas","html_url":"https://github.com/sujitbiswas","followers_url":"https://api.github.com/users/sujitbiswas/followers","following_url":"https://api.github.com/users/sujitbiswas/following{/other_user}","gists_url":"https://api.github.com/users/sujitbiswas/gists{/gist_id}","starred_url":"https://api.github.com/users/sujitbiswas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sujitbiswas/subscriptions","organizations_url":"https://api.github.com/users/sujitbiswas/orgs","repos_url":"https://api.github.com/users/sujitbiswas/repos","events_url":"https://api.github.com/users/sujitbiswas/events{/privacy}","received_events_url":"https://api.github.com/users/sujitbiswas/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-10-25T06:51:48Z","updated_at":"2017-11-15T08:01:39Z","closed_at":null,"author_association":"NONE","body":"@eaplatanios  is there a equivalent of tf.image.decode_jpeg or how can we directly use Op.Builder?"},"comment":{"url":"https://api.github.com/repos/eaplatanios/tensorflow_scala/issues/comments/344514733","html_url":"https://github.com/eaplatanios/tensorflow_scala/issues/32#issuecomment-344514733","issue_url":"https://api.github.com/repos/eaplatanios/tensorflow_scala/issues/32","id":344514733,"user":{"login":"eaplatanios","id":1294940,"avatar_url":"https://avatars2.githubusercontent.com/u/1294940?v=4","gravatar_id":"","url":"https://api.github.com/users/eaplatanios","html_url":"https://github.com/eaplatanios","followers_url":"https://api.github.com/users/eaplatanios/followers","following_url":"https://api.github.com/users/eaplatanios/following{/other_user}","gists_url":"https://api.github.com/users/eaplatanios/gists{/gist_id}","starred_url":"https://api.github.com/users/eaplatanios/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eaplatanios/subscriptions","organizations_url":"https://api.github.com/users/eaplatanios/orgs","repos_url":"https://api.github.com/users/eaplatanios/repos","events_url":"https://api.github.com/users/eaplatanios/events{/privacy}","received_events_url":"https://api.github.com/users/eaplatanios/received_events","type":"User","site_admin":false},"created_at":"2017-11-15T08:01:39Z","updated_at":"2017-11-15T08:01:39Z","author_association":"OWNER","body":"@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:\r\n\r\n- In the main TensorFlow codebase, find the `xx_ops.cc` file you are interested in. These are located in the `tensorflow/core/ops` directory in the main codebase. For example, in your case the file your interested in would be `tensorflow/core/ops/image_ops.cc`.\r\n- Find the definition of the op you're interested in, in that file. In your case, that would be in line 424.\r\n- Instantiate `Op.Builder` with the name of the CC registered op as its `opType` (e.g., `\"DecodeJpeg\"`) and any name you wish.\r\n- Add all necessary inputs and attributes. For that you can look into `tensorflow/core/ops/array_ops.cc`, for example, and my corresponding op interfaces in `org.platanios.tensorflow.api.ops.Basic`.\r\n- Call `build()` on the op builder and collect any outputs you wish. All op outputs are collected in a Scala sequence and the CC op registrations declare what they represent.\r\n\r\nEven though it may sound like a lot of steps you usually end up with 3-4 lines of code for each op.\r\n\r\nYou 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. :)"}}
{"actor":{"display_login":"eaplatanios"}}