附上代码网址:
https://github.com/aitorzip/PyTorch-CycleGAN
报错信息:
requests.exceptions.ConnectionError: HTTPConnectionPool(host='localhost', port=8097): Max retries exceeded with url: /events (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f19f9a5f0f0>: Failed to establish a new connection: [Errno 111] Connection refused',))
分析:
CycleGAN使用了可视化模块visdom,我虽然安装了,但是这里需要启用。
解决:
在控制台下启用visdom
python -m visdom.server
然后会看到这部分
由于Ubuntu上面没有安装浏览器,这时候使用一下命令安装火狐浏览器
sudo apt-get insatll firefox
启用火狐命令
firefox
在打开控制台,并且启用火狐之后,在浏览器上输入http://localhost:8097就可以看到图像了,之后可以选择关闭页面,但是需要保持控制台属于打开状态。
train
./train --dataroot datasets/<dataset_name>/ --cuda
test
./test --dataroot datasets/<dataset_name>/ --cuda