Open HeoJinLareine opened 4 years ago
I meet same problem with you , have you solve the problem?
You can start the visdom visualizatoin server by running python -m visdom.server
Then you can run the test.py
You can start the visdom visualizatoin server by running python -m visdom.server
Then you can run the test.py
+1
You can start the visdom visualizatoin server by running python -m visdom.server
Then you can run the test.py
Can i run the test.py without starting the visdom visualization server?
Traceback (most recent call last): File "/Users/heojin/anaconda3/envs/tensorflow/lib/python3.7/site-packages/urllib3/connection.py", line 159, in _new_conn (self._dns_host, self.port), self.timeout, **extra_kw) File "/Users/heojin/anaconda3/envs/tensorflow/lib/python3.7/site-packages/urllib3/util/connection.py", line 80, in create_connection raise err File "/Users/heojin/anaconda3/envs/tensorflow/lib/python3.7/site-packages/urllib3/util/connection.py", line 70, in create_connection sock.connect(sa) ConnectionRefusedError: [Errno 61] Connection refused
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "/Users/heojin/anaconda3/envs/tensorflow/lib/python3.7/site-packages/urllib3/connectionpool.py", line 600, in urlopen chunked=chunked) File "/Users/heojin/anaconda3/envs/tensorflow/lib/python3.7/site-packages/urllib3/connectionpool.py", line 354, in _make_request conn.request(method, url, **httplib_request_kw) File "/Users/heojin/anaconda3/envs/tensorflow/lib/python3.7/http/client.py", line 1229, in request self._send_request(method, url, body, headers, encode_chunked) File "/Users/heojin/anaconda3/envs/tensorflow/lib/python3.7/http/client.py", line 1275, in _send_request self.endheaders(body, encode_chunked=encode_chunked) File "/Users/heojin/anaconda3/envs/tensorflow/lib/python3.7/http/client.py", line 1224, in endheaders self._send_output(message_body, encode_chunked=encode_chunked) File "/Users/heojin/anaconda3/envs/tensorflow/lib/python3.7/http/client.py", line 1016, in _send_output self.send(msg) File "/Users/heojin/anaconda3/envs/tensorflow/lib/python3.7/http/client.py", line 956, in send self.connect() File "/Users/heojin/anaconda3/envs/tensorflow/lib/python3.7/site-packages/urllib3/connection.py", line 181, in connect conn = self._new_conn() File "/Users/heojin/anaconda3/envs/tensorflow/lib/python3.7/site-packages/urllib3/connection.py", line 168, in _new_conn self, "Failed to establish a new connection: %s" % e) urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPConnection object at 0x127f2fb70>: Failed to establish a new connection: [Errno 61] Connection refused
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "/Users/heojin/anaconda3/envs/tensorflow/lib/python3.7/site-packages/requests/adapters.py", line 449, in send timeout=timeout File "/Users/heojin/anaconda3/envs/tensorflow/lib/python3.7/site-packages/urllib3/connectionpool.py", line 638, in urlopen _stacktrace=sys.exc_info()[2]) File "/Users/heojin/anaconda3/envs/tensorflow/lib/python3.7/site-packages/urllib3/util/retry.py", line 399, in increment raise MaxRetryError(_pool, url, error or ResponseError(cause)) urllib3.exceptions.MaxRetryError: HTTPConnectionPool(host='localhost', port=8097): Max retries exceeded with url: /env/main (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x127f2fb70>: Failed to establish a new connection: [Errno 61] Connection refused'))
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "/Users/heojin/anaconda3/envs/tensorflow/lib/python3.7/site-packages/visdom/init.py", line 711, in _send data=json.dumps(msg), File "/Users/heojin/anaconda3/envs/tensorflow/lib/python3.7/site-packages/visdom/init.py", line 677, in _handle_post r = self.session.post(url, data=data) File "/Users/heojin/anaconda3/envs/tensorflow/lib/python3.7/site-packages/requests/sessions.py", line 581, in post return self.request('POST', url, data=data, json=json, kwargs) File "/Users/heojin/anaconda3/envs/tensorflow/lib/python3.7/site-packages/requests/sessions.py", line 533, in request resp = self.send(prep, send_kwargs) File "/Users/heojin/anaconda3/envs/tensorflow/lib/python3.7/site-packages/requests/sessions.py", line 646, in send r = adapter.send(request, **kwargs) File "/Users/heojin/anaconda3/envs/tensorflow/lib/python3.7/site-packages/requests/adapters.py", line 516, in send raise ConnectionError(e, request=request) requests.exceptions.ConnectionError: HTTPConnectionPool(host='localhost', port=8097): Max retries exceeded with url: /env/main (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x127f2fb70>: Failed to establish a new connection: [Errno 61] Connection refused')) [2019-12-26 13:36:06,820] INFO: Socket refused connection, running socketless [2019-12-26 13:36:06,820] ERROR: [Errno 61] Connection refused process image... ['./testDataset/1.jpg'] Traceback (most recent call last): File "test.py", line 56, in
torch.onnx.export(model, dummy_input, "Deblur.onnx")
File "/Users/heojin/anaconda3/envs/tensorflow/lib/python3.7/site-packages/torch/onnx/init.py", line 143, in export
strip_doc_string, dynamic_axes, keep_initializers_as_inputs)
File "/Users/heojin/anaconda3/envs/tensorflow/lib/python3.7/site-packages/torch/onnx/utils.py", line 66, in export
dynamic_axes=dynamic_axes, keep_initializers_as_inputs=keep_initializers_as_inputs)
File "/Users/heojin/anaconda3/envs/tensorflow/lib/python3.7/site-packages/torch/onnx/utils.py", line 382, in _export
fixed_batch_size=fixed_batch_size)
File "/Users/heojin/anaconda3/envs/tensorflow/lib/python3.7/site-packages/torch/onnx/utils.py", line 249, in _model_to_graph
graph, torch_out = _trace_and_get_graph_from_model(model, args, training)
File "/Users/heojin/anaconda3/envs/tensorflow/lib/python3.7/site-packages/torch/onnx/utils.py", line 198, in _trace_and_get_graph_from_model
orig_state_dict_keys = _unique_state_dict(model).keys()
File "/Users/heojin/anaconda3/envs/tensorflow/lib/python3.7/site-packages/torch/jit/init.py", line 282, in _unique_state_dict
state_dict = module.state_dict(keep_vars=True)
AttributeError: 'TestModel' object has no attribute 'state_dict'
Do you know why?