Pytorch-cyclegan-and-pix2pix: socket.error: [Errno 111] Connection refused

Created on 2 Jul 2017  路  10Comments  路  Source: junyanz/pytorch-CycleGAN-and-pix2pix

when i run the Pix2Pix
"python train.py --dataroot ./datasets/facades --name facades_pix2pix --model pix2pix --which_model_netG unet_256 --which_direction BtoA --lambda_A 100 --dataset_mode aligned --use_dropout --no_lsgan"

a problem happened as follow:

model [Pix2PixModel] was created
create web directory ./checkpoints/facades_pix2pix/web...
(epoch: 1, iters: 100, time: 5.015) G_GAN: 2.485 G_L1: 36.558 D_real: 0.151 D_fake: 0.257
(epoch: 1, iters: 200, time: 4.833) G_GAN: 3.015 G_L1: 43.858 D_real: 0.045 D_fake: 0.552
(epoch: 1, iters: 300, time: 4.797) G_GAN: 2.519 G_L1: 39.296 D_real: 0.039 D_fake: 0.149
(epoch: 1, iters: 400, time: 6.720) G_GAN: 2.393 G_L1: 25.259 D_real: 0.200 D_fake: 0.504
End of epoch 1 / 200 Time Taken: 5975 sec
Traceback (most recent call last):
File "train.py", line 20, in
for i, data in enumerate(dataset):
File "/usr/local/lib/python2.7/dist-packages/torch/utils/data/dataloader.py", line 206, in __next__
idx, batch = self.data_queue.get()
File "/usr/lib/python2.7/multiprocessing/queues.py", line 376, in get
return recv()
File "/usr/local/lib/python2.7/dist-packages/torch/multiprocessing/queue.py", line 22, in recv
return pickle.loads(buf)
File "/usr/lib/python2.7/pickle.py", line 1382, in loads
return Unpickler(file).load()
File "/usr/lib/python2.7/pickle.py", line 858, in load
dispatchkey
File "/usr/lib/python2.7/pickle.py", line 1133, in load_reduce
value = func(args)
File "/usr/local/lib/python2.7/dist-packages/torch/multiprocessing/reductions.py", line 68, in rebuild_storage_fd
fd = multiprocessing.reduction.rebuild_handle(df)
File "/usr/lib/python2.7/multiprocessing/reduction.py", line 155, in rebuild_handle
conn = Client(address, authkey=current_process().authkey)
File "/usr/lib/python2.7/multiprocessing/connection.py", line 169, in Client
c = SocketClient(address)
File "/usr/lib/python2.7/multiprocessing/connection.py", line 304, in SocketClient
s.connect(address)
File "/usr/lib/python2.7/socket.py", line 224, in meth
return getattr(self._sock,name)(
args)
socket.error: [Errno 111] Connection refused

how to solve the problem?

Most helpful comment

Please install the visdom library, and run the following command python -m visdom.server. Please see more details in training/test details.

All 10 comments

Please install the visdom library, and run the following command python -m visdom.server. Please see more details in training/test details.

screenshot from 2017-07-04 09_23_36
thank you very much. But i have not solve the problem, i have run the command python -m visdom.server. I set the --display_id = 1. I open the http://localhost:8097, nothing in the html.
So i need your help.
Thank you very much! And what should i do next?

Should i run the command http://localhost:8097/env/1 ?

It might be related to the data_loader. Could you try set --nThreads 1 and see what will happen?

Thank you. I set --nThreds 1, but the same problem happened again.

And I run another dataset edges2shoes. No problem happend.

I was running with CPU and had the same problem. Setting --nThreads 0 and --display_id 0 solved the problem for me.

Thanks, I use your ways . And I have solved the problem. Thank you very much.

I have the same bug,,when I setting --nThreads 0 and --display_id锛岋紝锛孌oI need to run the program after the file changes, such thatpython base_options.py` ? I am note sure the run sequence .

Was this page helpful?
0 / 5 - 0 ratings

Related issues

TheIllusion picture TheIllusion  路  5Comments

bill0812 picture bill0812  路  3Comments

John1231983 picture John1231983  路  3Comments

nootfly picture nootfly  路  4Comments

davidwessman picture davidwessman  路  3Comments