Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Training is interspersed with ConnectionErrors #279

Closed
9thDimension opened this issue May 30, 2018 · 2 comments
Closed

Training is interspersed with ConnectionErrors #279

9thDimension opened this issue May 30, 2018 · 2 comments

Comments

@9thDimension
Copy link

Just doing a first test run on the facades data before using my own dataset. The training seems to be progressing slowly. But it looks like each epoch I see an error:

/home/sal9000/virtualenvs/pytorch_seg_env/bin/python /home/sal9000/Sources/pytorch-CycleGAN-and-pix2pix/train.py --dataroot /home/sal9000/Sources/pytorch-CycleGAN-and-pix2pix/datasets/datasets/facades --name facades_peex2peex --model pix2pix --which_model_netG unet_256 --which_direction AtoB --lambda_A 100 --dataset_mode aligned --no_lsgan --norm batch --pool_size 0 --gpu_ids -1
------------ Options -------------
batchSize: 1
beta1: 0.5
checkpoints_dir: ./checkpoints
continue_train: False
dataroot: /home/sal9000/Sources/pytorch-CycleGAN-and-pix2pix/datasets/datasets/facades
dataset_mode: aligned
display_freq: 400
display_id: 1
display_ncols: 4
display_port: 8097
display_server: http://localhost
display_winsize: 256
epoch_count: 1
fineSize: 256
gpu_ids: []
init_type: normal
input_nc: 3
isTrain: True
lambda_A: 100.0
lambda_B: 10.0
lambda_identity: 0.5
loadSize: 286
lr: 0.0002
lr_decay_iters: 50
lr_policy: lambda
max_dataset_size: inf
model: pix2pix
nThreads: 4
n_layers_D: 3
name: facades_peex2peex
ndf: 64
ngf: 64
niter: 100
niter_decay: 100
no_dropout: False
no_flip: False
no_html: False
no_lsgan: True
norm: batch
output_nc: 3
phase: train
pool_size: 0
print_freq: 100
resize_or_crop: resize_and_crop
save_epoch_freq: 5
save_latest_freq: 5000
serial_batches: False
suffix: 
update_html_freq: 1000
verbose: False
which_direction: AtoB
which_epoch: latest
which_model_netD: basic
which_model_netG: unet_256
-------------- End ----------------
CustomDatasetDataLoader
dataset [AlignedDataset] was created
#training images = 400
initialize network with normal
initialize network with normal
model [Pix2PixModel] was created
---------- Networks initialized -------------
[Network G] Total number of parameters : 54.414 M
[Network D] Total number of parameters : 2.769 M
-----------------------------------------------
create web directory ./checkpoints/facades_peex2peex/web...
(epoch: 1, iters: 100, time: 3.225, data: 0.076) G_GAN: 3.367 G_L1: 29.776 D_real: 0.047 D_fake: 0.053 
Exception in user code:
Traceback (most recent call last):
------------------------------------------------------------
  File "/home/sal9000/virtualenvs/pytorch_seg_env/local/lib/python2.7/site-packages/visdom/__init__.py", line 388, in _send
    data=json.dumps(msg),
  File "/home/sal9000/virtualenvs/pytorch_seg_env/local/lib/python2.7/site-packages/requests/api.py", line 112, in post
    return request('post', url, data=data, json=json, **kwargs)
  File "/home/sal9000/virtualenvs/pytorch_seg_env/local/lib/python2.7/site-packages/requests/api.py", line 58, in request
    return session.request(method=method, url=url, **kwargs)
  File "/home/sal9000/virtualenvs/pytorch_seg_env/local/lib/python2.7/site-packages/requests/sessions.py", line 508, in request
    resp = self.send(prep, **send_kwargs)
  File "/home/sal9000/virtualenvs/pytorch_seg_env/local/lib/python2.7/site-packages/requests/sessions.py", line 618, in send
    r = adapter.send(request, **kwargs)
  File "/home/sal9000/virtualenvs/pytorch_seg_env/local/lib/python2.7/site-packages/requests/adapters.py", line 508, in send
    raise ConnectionError(e, request=request)
ConnectionError: HTTPConnectionPool(host='localhost', port=8097): Max retries exceeded with url: /events (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f9050a18110>: Failed to establish a new connection: [Errno 111] Connection refused',))
(epoch: 1, iters: 200, time: 6.900, data: 0.001) G_GAN: 3.504 G_L1: 59.496 D_real: 0.009 D_fake: 0.272 
Traceback (most recent call last):
  File "/home/sal9000/virtualenvs/pytorch_seg_env/local/lib/python2.7/site-packages/visdom/__init__.py", line 388, in _send
    data=json.dumps(msg),
  File "/home/sal9000/virtualenvs/pytorch_seg_env/local/lib/python2.7/site-packages/requests/api.py", line 112, in post
    return request('post', url, data=data, json=json, **kwargs)
  File "/home/sal9000/virtualenvs/pytorch_seg_env/local/lib/python2.7/site-packages/requests/api.py", line 58, in request
    return session.request(method=method, url=url, **kwargs)
  File "/home/sal9000/virtualenvs/pytorch_seg_env/local/lib/python2.7/site-packages/requests/sessions.py", line 508, in request
    resp = self.send(prep, **send_kwargs)
  File "/home/sal9000/virtualenvs/pytorch_seg_env/local/lib/python2.7/site-packages/requests/sessions.py", line 618, in send
    r = adapter.send(request, **kwargs)
  File "/home/sal9000/virtualenvs/pytorch_seg_env/local/lib/python2.7/site-packages/requests/adapters.py", line 508, in send
    raise ConnectionError(e, request=request)
ConnectionError: HTTPConnectionPool(host='localhost', port=8097): Max retries exceeded with url: /events (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f9050a46a50>: Failed to establish a new connection: [Errno 111] Connection refused',))
Exception in user code:
------------------------------------------------------------

@ACUPSUN
Copy link

ACUPSUN commented May 31, 2018

run python -m visdom.server,then run your code

@junyanz
Copy link
Owner

junyanz commented Jun 1, 2018

Yes. See #230 for more details.

@junyanz junyanz closed this as completed Jun 1, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants