Vam*_*avi 6 python keras tensorflow
我已经使用重新训练了我的模型tensorflow,现在想使用它keras来避免会话内容。我怎样才能将.pb文件转换为.h5
import tensorflow as tf
from tensorflow.keras.models import save_model, Sequential
model_path = r"c:\temp\model.pb"
model = tf.keras.models.load_model(model_path)
save_model(model,model_path + r"\new_model.h5", save_format='h5')
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
8009 次 |
| 最近记录: |