Failed to establish a new connection:[Errno 111] connection refused training GP-GAN(Pytorch)

reference :https://github.com/junyanz/pytorch-CycleGAN-and-pix2pix/issues/38

Failed to establish a new connection:[Errno 111] connection refused #129

requests.exceptions.ConnectionError: HTTPConnectionPool(host='localhost', port=8889): Max retries exceeded with url: /env/main (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f1ca74fb208>: Failed to establish a new connection: [Errno 111] Connection refused',)). Basically, visdom error. It seems visdom error is from bug.

python -m visdom.server

The visdom display functionality is turned on by default. To avoid the extra overhead of communicating with visdom set --display_id 0.

If you want to use the visdom server, you should change the display_id to a non-zero value. To view training results and loss plots, run python -m visdom.server and click the URL http://localhost:8097.

added "--display_id 0" running train.py but I still get this error

example: when I training GP-GAN

(Paper: GP-GAN: Gender-Preserving-GAN-for-Synthesizing-Faces-from-Landmarks )

(source code: https://github.com/DetionDX/GP-GAN-GenderPreserving-GAN-for-Synthesizing-Faces-from-Landmarks)

(training command: python train.py --dataroot ./datasets/lfw/ --which_direction BtoA --fineSize 64 --loadSize 64 --no_flip --name lfw_gpgan)

When I alone run the training command there is a error : Failed to establish a new connection:[Errno 111] connection refused 

So I modified the command by adding "--display_id 0" in end of previouse training command that result in it become:  python train.py --dataroot ./datasets/lfw/ --which_direction BtoA --fineSize 64 --loadSize 64 --no_flip --name lfw_gpgan --display_id 0

It run successfully

However, if you results are not so good that you are satisfied you can continue training

Adding "--continue" in the end of the training command like this:

python train.py --dataroot ./datasets/lfw/ --which_direction BtoA --fineSize 64 --loadSize 64 --no_flip --name lfw_gpgan --continue

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章