0
votes

I have created a model and it works fine. Later I saved with the following command.

export_path = os.getcwd()+"\\saved_models\\{}".format(int(t))
model.save(export_path, save_format='tf')

and converted for tfjs with the following command

tensorflowjs_converter --input_format=tf_saved_model ./saved_models/1574041992 ./saved_models/tfjs_model/

tfjs_model is created however it cant be loaded in tfjs. I downloaded a sample model and it worked fine. When I compare two model.json;

working version starts with following content:

{"format": "graph-model"

non-working version starts with following content:

{"modelTopology": {"training_config": ...............

Why my model is different? Did I create in wrong format?If so what is the correct one?

Thanks for your answer in advance.

TensorFlow.js version

2.0.0

Browser version

Version 78.0.3904.97 (Official Build) (64-bit)

Python: 3.8

1

1 Answers

0
votes

please double check your tensorflowjs pip version, the latest is 1.3.2 you can update the pip using command as following:

pip install tensorflowjs --upgrade