-
Notifications
You must be signed in to change notification settings - Fork 206
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding layers (based on keras) supporting multiple outputs #65
base: master
Are you sure you want to change the base?
Conversation
@dhruvrajan , can you please provide some feedbacks for the status of this PR? Do you still intend to make it official? |
I might be interested in picking this up if there is interest in this |
Hi @KartikChugh , there is certainly interest in this and happy if you could help! We did not hear from @dhruvrajan for awhile so I don't know if he was still planning to complete his work. But @JimClarke5 is another member of this community who is working actively in the new Keras layer, we should probably sync up with him. Jim, did you already start to work on the layers? How would you like Kartik to help? |
Thanks @karllessard @KartikChugh, I welcome the offer to help. I am in the early stages of looking at layers. My game plan is to build |
I would also be interested in helping. I have limited time and I'm a deep learning beginner. From looking at I imagine our goal would be to transliterate Python Keras pretty closely? Like if I looked at a Python Keras program and I'm a Java expert, I should be able to imagine the idiomatic Java way to code those things and that's the API I can expect? And then I should expect the exact same calls on TensorFlow from the Java version as from the Python version? |
Transliterating directly from Python code might not be that straightforward in all cases, as the TF Python client used to exist way before Keras was added to the project so it has a lot of high-level (and deprecated?) APIs that wraps up the raw operators and can bring some complexities that might not be required for Keras usage. Since in TF Java we basically only deal with raw operators (with a few exceptions), we need to identify what is really required by Keras out of these wrappers and discard the rest, at least for now... but other than that, yes, that's pretty much it! I'm not taking part of the Keras Java library so much so far but if I can help you to synchronize your work, by creating a branch in the repo or speeding up some PRs (yes sorry for that @JimClarke5 ;) ), just let me know and I will be pleased to assist. Also note that the second-monthly SIG meeting will be pretty much be dedicated for Keras Java development in the future, that can also help with the whole collaboration process. |
I haven’t looked at multiple inputs/outputs closely, but have designed my layer base class to accept them, based on the python Layer class. Dense and Flatten only accept 1 input/output. I would be glad to see the USE cases though. |
As far as test cases, I am copying test cases from python when it makes sense. Some python test cases use numpy for comparison, which is not concise when porting directly to Java. Some tests don’t exist, so I have to create them from scratch. I find that I first port the Python Keras code over, then immediately do the test case, that in turn results in fixing the original port of the Java Keras code. Some python ism’s do not port easily, like accessing tensor values using overloaded operators. |
I've heard from Dhruv that the JS code is much better to port over |
Just a quick mention that anyone interested in participating to the development of Keras API for Java is invited to join our monthly meeting about this topic, next session is Friday August 28th at 9am PST and you can find the agenda and links here. Thanks! |
@karllessard, @Craigacp : In my work analyzing As a result, I am starting initial work on a version of My initial approach is to mimic |
Hey @JimClarke5 , sounds good to me, I suggest we start a new PR and close this one. |
This draft PR is tracking the implementation of keras layers in Java; will update with a README once the API is complete, and mark for review when it's ready.