pip install tensorflowjs
import tensorflowjs as tfjs
from keras.models import load_model
model = load_model("model.h5")
tfjs_target_dir = " "
tfjs.converters.save_keras_model(model,tfjs_target_dir)
pip install tensorflowjs
import tensorflowjs as tfjs
from keras.models import load_model
model = load_model("model.h5")
tfjs_target_dir = " "
tfjs.converters.save_keras_model(model,tfjs_target_dir)
转载于:https://www.cnblogs.com/panda-s/p/10089644.html