TensorFlow & Kerasのモデル

2020/01/23

Categories: MachineLearning Tags: Tensorflow Keras

Knowledge

Model

保存の関数 読み込みの関数 対象(拡張子)
model.save(‘hoge.h5’) model = load_model(‘hoge.h5’) アーキテクチャ + 重み + オプティマイザの状態(.hdf5 or .h)
json_string = model.to_json() model = model_from_json(json_string) モデルのアーキテクチャ(weightパラメータや学習時の設定は含まない)(.json or .yml)
model.save_weights(‘hoge.h5’) model.load_weights(‘hoge.h5’) モデルの重みのみ(.hdf5 or .h)

References

TF2.0

Model save and load

TF1.0

Model save and load

References

Keras

Model save and load

References

>> Home