Skip to content

Conversation

@pyu10055
Copy link
Collaborator

@pyu10055 pyu10055 commented Jun 2, 2020

In TF 2.2.0 the recurrent network weight name has been changed, now it is in
form of layer_name/cell_name/weight_name
We need to be able to handle both TF 2.1.0 format layer_name/weight_name and
2.2.0 format

Fixed #3314

To see the logs from the Cloud Build CI, please join either our discussion or announcement mailing list.


This change is Reviewable

@pyu10055 pyu10055 requested a review from lina128 June 2, 2020 00:03
Copy link
Collaborator

@lina128 lina128 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewable status: :shipit: complete! 1 of 1 approvals obtained (waiting on @lina128 and @pyu10055)


tfjs-converter/python/tensorflowjs/converters/keras_tfjs_loader.py, line 92 at r1 (raw file):

        # the inner cell name.
        tokens = name.split('/')
        shorten_name = '/'.join(name[0:-2] + [name[-1]])

'/'.join(tokens[0:-2] + [tokens[-1]])

Copy link
Collaborator Author

@pyu10055 pyu10055 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewable status: :shipit: complete! 1 of 1 approvals obtained


tfjs-converter/python/tensorflowjs/converters/keras_tfjs_loader.py, line 92 at r1 (raw file):

Previously, lina128 (Na Li) wrote…

'/'.join(tokens[0:-2] + [name[-1]])

Done.

@pyu10055 pyu10055 merged commit f630150 into master Jun 2, 2020
@pyu10055 pyu10055 deleted the keras_loader branch June 2, 2020 02:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Cannot load saved Keras model with recurrent layer

3 participants