-
Notifications
You must be signed in to change notification settings - Fork 6.4k
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
Why I meet ValueError: empty range for randrange() (0,-127, -127)? #194
Comments
It might be related to the data loader. Could you try |
Thanks,But i meet another problem.. Traceback (most recent call last): File "/home/moon/miniconda2/lib/python2.7/site-packages/visdom/__init__.py", line 261, in _send data=json.dumps(msg), File "/home/moon/miniconda2/lib/python2.7/site-packages/requests/api.py", line 112, in post return request('post', url, data=data, json=json, **kwargs) File "/home/moon/miniconda2/lib/python2.7/site-packages/requests/api.py", line 58, in request return session.request(method=method, url=url, **kwargs) File "/home/moon/miniconda2/lib/python2.7/site-packages/requests/sessions.py", line 508, in request resp = self.send(prep, **send_kwargs) File "/home/moon/miniconda2/lib/python2.7/site-packages/requests/sessions.py", line 618, in send r = adapter.send(request, **kwargs) File "/home/moon/miniconda2/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(': Failed to establish a new connection: [Errno 111] Connection refused',)) Exception in user code: ------------------------------------------------------------ Traceback (most recent call last): File "/home/moon/miniconda2/lib/python2.7/site-packages/visdom/__init__.py", line 261, in _send data=json.dumps(msg), File "/home/moon/miniconda2/lib/python2.7/site-packages/requests/api.py", line 112, in post return request('post', url, data=data, json=json, **kwargs) File "/home/moon/miniconda2/lib/python2.7/site-packages/requests/api.py", line 58, in request return session.request(method=method, url=url, **kwargs) File "/home/moon/miniconda2/lib/python2.7/site-packages/requests/sessions.py", line 508, in request resp = self.send(prep, **send_kwargs) File "/home/moon/miniconda2/lib/python2.7/site-packages/requests/sessions.py", line 618, in send r = adapter.send(request, **kwargs) File "/home/moon/miniconda2/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(': Failed to establish a new connection: [Errno 111] Connection refused',)) Exception in user code: ------------------------------------------------------------ Traceback (most recent call last): File "/home/moon/miniconda2/lib/python2.7/site-packages/visdom/__init__.py", line 261, in _send data=json.dumps(msg), File "/home/moon/miniconda2/lib/python2.7/site-packages/requests/api.py", line 112, in post return request('post', url, data=data, json=json, **kwargs) File "/home/moon/miniconda2/lib/python2.7/site-packages/requests/api.py", line 58, in request return session.request(method=method, url=url, **kwargs) File "/home/moon/miniconda2/lib/python2.7/site-packages/requests/sessions.py", line 508, in request resp = self.send(prep, **send_kwargs) File "/home/moon/miniconda2/lib/python2.7/site-packages/requests/sessions.py", line 618, in send r = adapter.send(request, **kwargs) File "/home/moon/miniconda2/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(': Failed to establish a new connection: [Errno 111] Connection refused',)) (epoch: 1, iters: 200, time: 0.231) D_A: 0.278 G_A: 0.306 Cyc_A: 1.762 D_B: 0.362 G_B: 0.131 Cyc_B: 2.103 idt_A: 1.058 idt_B: 0.807 Exception in user code: ------------------------------------------------------------ Traceback (most recent call last): File "/home/moon/miniconda2/lib/python2.7/site-packages/visdom/__init__.py", line 261, in _send data=json.dumps(msg), File "/home/moon/miniconda2/lib/python2.7/site-packages/requests/api.py", line 112, in post return request('post', url, data=data, json=json, **kwargs) File "/home/moon/miniconda2/lib/python2.7/site-packages/requests/api.py", line 58, in request return session.request(method=method, url=url, **kwargs) File "/home/moon/miniconda2/lib/python2.7/site-packages/requests/sessions.py", line 508, in request resp = self.send(prep, **send_kwargs) File "/home/moon/miniconda2/lib/python2.7/site-packages/requests/sessions.py", line 618, in send r = adapter.send(request, **kwargs) File "/home/moon/miniconda2/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(': Failed to establish a new connection: [Errno 111] Connection refused',)) |
This is related to visdom. See this post for the fix. |
It's awesome!! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
model [CycleGANModel] was created
create web directory ./checkpoints/maps_cyclegan/web...
Traceback (most recent call last):
File "train.py", line 21, in
for i, data in enumerate(dataset):
File "/home/moon/pytorch-CycleGAN-and-pix2pix-master/data/custom_dataset_data_loader.py", line 44, in iter
for i, data in enumerate(self.dataloader):
File "/home/moon/miniconda2/lib/python2.7/site-packages/torch/utils/data/dataloader.py", line 210, in next
return self._process_next_batch(batch)
File "/home/moon/miniconda2/lib/python2.7/site-packages/torch/utils/data/dataloader.py", line 230, in _process_next_batch
raise batch.exc_type(batch.exc_msg)
ValueError: Traceback (most recent call last):
File "/home/moon/miniconda2/lib/python2.7/site-packages/torch/utils/data/dataloader.py", line 42, in _worker_loop
samples = collate_fn([dataset[i] for i in batch_indices])
File "/home/moon/pytorch-CycleGAN-and-pix2pix-master/data/unaligned_dataset.py", line 37, in getitem
A = self.transform(A_img)
File "/home/moon/miniconda2/lib/python2.7/site-packages/torchvision-0.2.0-py2.7.egg/torchvision/transforms/transforms.py", line 42, in call
img = t(img)
File "/home/moon/miniconda2/lib/python2.7/site-packages/torchvision-0.2.0-py2.7.egg/torchvision/transforms/transforms.py", line 286, in call
i, j, h, w = self.get_params(img, self.size)
File "/home/moon/miniconda2/lib/python2.7/site-packages/torchvision-0.2.0-py2.7.egg/torchvision/transforms/transforms.py", line 271, in get_params
i = random.randint(0, h - th)
File "/home/moon/miniconda2/lib/python2.7/random.py", line 244, in randint
return self.randrange(a, b+1)
File "/home/moon/miniconda2/lib/python2.7/random.py", line 220, in randrange
raise ValueError, "empty range for randrange() (%d,%d, %d)" % (istart, istop, width)
ValueError: empty range for randrange() (0,-127, -127)
Thanks in advance.
The text was updated successfully, but these errors were encountered: