Last active
September 15, 2021 18:29
-
-
Save xsqian/fb5b20bdfc517237f0a97322be80a2e0 to your computer and use it in GitHub Desktop.
How to export a .h5 model to jaon
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# install | |
pip install tensorflowjs | |
# convert h5 model to json | |
tensorflowjs_converter --input_format=keras model_3.h5 model_3.json | |
# view the model in json format: | |
python -m json.tool model.json | |
# note: jq need os access to install, not just a pip install, | |
# https://stedolan.github.io/jq/download/ | |
#on linux | |
sudo apt-get install jq | |
# on mac | |
brew install jq | |
jq --color-output . model.json | less -R | |
cat model.json | jq . | |
kubectl get node -o json | jq |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment