'1.0.1'
(retrain.py did not work with tf-nightly-2.0, so that was run with '1.13.1 ('v1.13.1-0-g6612da8951')'. Installing tensorflowjs-converter then installed tf-nightly-2.0-preview-2.0.0.dev20190509)
n.a.
Both tutorials at https://www.tensorflow.org/hub/tutorials/image_retraining and
https://www.tensorflow.org/tutorials/images/hub_with_keras about retraining a model mention but do not describe conversion to mobile models. Yet, conversion using tensorflowjs_converter failed in every attempt. https://stackoverflow.com/questions/55849309/retrain-image-detection-with-mobilenet mentions two attempts by me as well as questions by others with the same problem.
and github issues
cc @pyu10055
@serv-inc please check SO https://stackoverflow.com/questions/55849309/retrain-image-detection-with-mobilenet for answers.
The resulting model failed to load with
'className' and 'config' must set.[sic]
at new ValueError (/tmp/node_modules/@tensorflow/tfjs-layers/dist/errors.js:68:28)
at Object.deserializeKerasObject (/tmp/node_modules/@tensorflow/tfjs-layers/dist/utils/generic_utils.js:241:19)
at Object.deserialize (/tmp/node_modules/@tensorflow/tfjs-layers/dist/layers/serialization.js:29:28)
at /tmp/node_modules/@tensorflow/tfjs-layers/dist/models.js:290:45
at step (/tmp/node_modules/@tensorflow/tfjs-layers/dist/models.js:54:23)
at Object.next (/tmp/node_modules/@tensorflow/tfjs-layers/dist/models.js:35:53)
at fulfilled (/tmp/node_modules/@tensorflow/tfjs-layers/dist/models.js:26:58)
when called as tf.loadLayersModel("file:///tmp/web_model/model.json")
Hi @serv-inc
I encountered the same problem and it seems that we use the wrong method.
There are loadGraphModel for TF converted models and loadLayersModel for Keras ones
Most helpful comment
Hi @serv-inc
I encountered the same problem and it seems that we use the wrong method.
There are loadGraphModel for TF converted models and loadLayersModel for Keras ones