Skip to content
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

GRU support with linear_before_reset #452

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

iiSeymour
Copy link

@iiSeymour iiSeymour commented Jul 3, 2019

Similar to #227 but without adding the backend, uses the CudnnCompatibleGRUCell implementation in TensorFlow instead.

This was referenced Jul 8, 2019
@CLAassistant
Copy link

CLAassistant commented Jul 24, 2019

CLA assistant check
All committers have signed the CLA.

@chinhuang007
Copy link
Collaborator

Looks like https://www.tensorflow.org/api_docs/python/tf/contrib/cudnn_rnn/CudnnCompatibleGRUCell is deprecated. In general, we should avoid using APIs in contrib. We would need to replace it soon anyway so could you find alternative ways?

@iiSeymour
Copy link
Author

It looks like the new GRU layer is CuDNN compatible and supports reset_after so I think it should just be a case of swapping tf.contrib.cudnn_rnn.CudnnCompatibleGRUCell for tf.keras.layers.GRU. I will have a proper look tomorrow.

@iiSeymour
Copy link
Author

Needs #460 fixing first.

@chinhuang007
Copy link
Collaborator

Yeah, we will need to revisit this once we get to TF 2.0

@dianyo
Copy link

dianyo commented Jul 31, 2020

Hi, does this feature still on progress? I met this problem when I transfer my ONNX model. I'd like to fix this, if there's no implement yet

@alamnasim
Copy link

Hi, does this feature still on progress? I met this problem when I transfer my ONNX model. I'd like to fix this, if there's no implement yet

Any update on this? I am also facing the same issue while converting ONNX to tensorflow.

@iiSeymour
Copy link
Author

The patch I submitted worked for me at time submission but I don't have time to (re)evaluate currently @alamnasim @dianyo give it a try.

@tylerweitzman
Copy link

Any update on this?

@TingfengTang
Copy link

@iiSeymour, when I use your gru-reset-after branch,I found the value of the argument 'name' in function _custom_getter() which defined in gru.py is 'GRU_9c8f1236/rnn/multi_rnn_cell/cell_0/cudnn_compatible_gru_cell/candidate/hidden_projection/bias'. Can you tell me how is the argement name generated, I have not found it in the context, thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants