-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Support passing JActivity from python to java #1985
base: master
Are you sure you want to change the base?
Conversation
@jason-dai How about this style? Java Side:
Python Side:
|
jenkins passed |
Please check with @dding3 on how this will be used? |
I usually set state which returned from get_hidden_state directly in set_hidden_state. And I tried this PR with simplernn/lstm/multirnncell, it works good. |
Why do you need to do that in python @dding3 ? I think this is needed in seq2seq training, and that's done in scala side? |
Yes, it's done in scala side. However in scala Recurrent, we support get/setHiddenState and they are public APIs. Besides, both tf and torch support user set init state. I am thinking it would be better if we support these functionality in python as well. |
I don't think we need to add that at this moment if no one is expected use that. |
BTW, the there's no overhead for get/set JActivity if without calling |
What changes were proposed in this pull request?
This PR would enable us to pass
JActivity
from Python to Java which is consist ofndarray
or nested list ofndarray
.JActivity
(Python) -->JActivity
(Java)i.e:
How was this patch tested?
unittest