20180313风格迁移调试

  今天主要还是根据这篇文章——https://www.leiphone.com/news/201701/tGlVRXWShwe7ffHW.html?viewType=weixin

  进行 use trained model 的调试,在昨天download了model的基础上进行操作:

python eval.py --model_file <your path to wave.ckpt-done> --image_file img/test.jpg

作者写的较为简单,解释下上面的意思:在python环境中run eval.py操作,——后是将原程序中进行部分小修改,原来的程序为:

tf.app.flags.DEFINE_string("model_file", "models.ckpt", "")
tf.app.flags.DEFINE_string("image_file", "a.jpg", "")

经过修改后程序为:

tf.app.flags.DEFINE_string("model_file", "./models/wave.ckpt-done", "")
tf.app.flags.DEFINE_string("image_file", "./img/test.jpg", "")

踩过的几个坑有:

1.显卡驱动与cuda的版本不符合,需要更新驱动

解决方法:在驱动精灵中更新,避免自己版本选择上、卸载、安装上的失误

2.两个file文件读不出来,而路径没问题

解决方法:在路径前加./

3.ckpt文件读取不到

解决方法:将.ckpt改为.ckpt-done

4.硬件显存/内存不足,发生OOM报错(应该是out of memory)

解决方法:使用电脑截图工具裁剪图片


猜你喜欢

转载自blog.csdn.net/weixin_41819299/article/details/79547610