photoshop的train.py不能保存模型文件:generator_weight
来源:8-4 如何学习一门技术及课程知识点总结
卖破烂的0
2018-10-16
- 环境:macbook10.12.6 (16G29),python2.7,virtualenv.
- 描述:下载了老师的train.py跑,到Epoch 9, 第 22 步, 生成器的损失: 1.945, 判别器的损失: 1.434之后报错如下,google不到原因,程序也推出了。
- 错误内容:
WARNING:tensorflow:This model was compiled with a Keras optimizer (<tensorflow.python.keras.optimizers.Adam object at 0x1310a1350>) but is being saved in TensorFlow format with
save_weights. The model's weights will be saved, but unlike with TensorFlow optimizers in the TensorFlow format the optimizer's state will not be saved.
Consider using a TensorFlow optimizer from
tf.train. 2018-10-16 12:50:29.019043: W tensorflow/core/framework/op_kernel.cc:1273] OP_REQUIRES failed at save_restore_v2_ops.cc:109 : Not found: ; No such file or directory Traceback (most recent call last): File "train.py", line 92, in <module> train() File "train.py", line 87, in train g.save_weights("generator_weight1016", True) File "/Users/hahaxixi2017/PycharmProjects/tensorflow/lib/python2.7/site-packages/tensorflow/python/keras/engine/network.py", line 1458, in save_weights self._checkpointable_saver.save(filepath, session=session) File "/Users/hahaxixi2017/PycharmProjects/tensorflow/lib/python2.7/site-packages/tensorflow/python/training/checkpointable/util.py", line 1309, in save global_step=checkpoint_number) File "/Users/hahaxixi2017/PycharmProjects/tensorflow/lib/python2.7/site-packages/tensorflow/python/training/saver.py", line 1450, in save raise exc ValueError: Parent directory of generator_weight doesn't exist, can't save.
3回答
-
我也遇到这个问题,请问最后是怎么解决的?
032018-12-13 -
慕移动3492956
2018-12-11
我也遇到这个问题
00 -
Oscar
2018-10-18
你是不是修改过我的代码?
你的 train.py 的存放路径是什么?
看这里错误信息是因为找不到存放 generator_weight 的上级目录。
g.save_weights("generator_weight1016", True)
你改了一些代码是吧?
012018-10-18
相似问题