tensorflow / tfjs

A WebGL accelerated JavaScript library for training and deploying ML models.
https://js.tensorflow.org
Apache License 2.0
18.51k stars 1.93k forks source link

Issue when using tensorflowjs_converter #3102

Closed carlos-aguayo closed 4 years ago

carlos-aguayo commented 4 years ago

TensorFlow.js version

2.1.0

Browser version

Chrome 80

Describe the problem or feature request

I'm converting a Keras model to be used with Tensorflow.js

I was using 'tensorflowjs_converter' and when loading the model in the browser using I got an: "Uncaught (in promise) Error: Provided weight data has no target variable: bidirectional_19/forward_lstm_19/lstm_cell_58/kernel"

I found out that if I instead use 'tfjs.converters.save_keras_model', that works fine!

I noticed the both methods generated the same weights file but different JSON file.

I also noticed that the 'tensorflowjs_converter' tool seems to be getting a different version of Keras and I don't know why.

Code to reproduce the bug / link to feature request

I put together this Colab notebook that should make it easy to see the problem.

2020-04-18_1155
pyu10055 commented 4 years ago

@caisq can you take a quick look if anything looks suspicious. thanks

rthadur commented 4 years ago

this is fixed here , thank you