Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

怎么存模型呢 #21

Open
Fino2020 opened this issue Jul 20, 2022 · 0 comments
Open

怎么存模型呢 #21

Fino2020 opened this issue Jul 20, 2022 · 0 comments

Comments

@Fino2020
Copy link

Fino2020 commented Jul 20, 2022

请问这个模型应该怎么存,我想写一个单独的预测函数,在训练位置saver.save(sess, '../save_model/atttn_lstm_hierarchical/')
在预测的地方加载模型的时候使用

 with tf.Session()as sess:
        saver = tf.train.import_meta_graph('./save_model/atttn_lstm_hierarchical/-1000.meta')
        saver.restore(sess, tf.train.latest_checkpoint('./save_model/atttn_lstm_hierarchical'))

但是报错如下:
QQ截图20220720094928
请问是什么问题呢

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant