(final) home@home-desktop:~/p10/ext_portrait_segmentation$ python main.py --c ./setting/SINet.json Use Lovasz loss Run : Enc_SINet SINet Enc bracnch num : 2 SINet Enc chnn num: 1 This module has [[3, 1], [5, 1]] This module has [[3, 1], [3, 1]] This module has [[3, 1], [5, 1]] This module has [[3, 1], [3, 1]] This module has [[5, 1], [3, 2]] This module has [[5, 2], [3, 4]] This module has [[3, 1], [3, 1]] This module has [[5, 1], [5, 1]] This module has [[3, 2], [3, 4]] This module has [[3, 1], [5, 2]] 1 Use gpu : 1 Done Setting up a new session... Exception in user code: ------------------------------------------------------------ Traceback (most recent call last): File "/home/home/anaconda3/envs/final/lib/python3.6/site-packages/urllib3/connection.py", line 157, in _new_conn (self._dns_host, self.port), self.timeout, **extra_kw File "/home/home/anaconda3/envs/final/lib/python3.6/site-packages/urllib3/util/connection.py", line 84, in create_connection raise err File "/home/home/anaconda3/envs/final/lib/python3.6/site-packages/urllib3/util/connection.py", line 74, in create_connection sock.connect(sa) ConnectionRefusedError: [Errno 111] Connection refused During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/home/anaconda3/envs/final/lib/python3.6/site-packages/urllib3/connectionpool.py", line 672, in urlopen chunked=chunked, File "/home/home/anaconda3/envs/final/lib/python3.6/site-packages/urllib3/connectionpool.py", line 387, in _make_request conn.request(method, url, **httplib_request_kw) File "/home/home/anaconda3/envs/final/lib/python3.6/http/client.py", line 1254, in request self._send_request(method, url, body, headers, encode_chunked) File "/home/home/anaconda3/envs/final/lib/python3.6/http/client.py", line 1300, in _send_request self.endheaders(body, encode_chunked=encode_chunked) File "/home/home/anaconda3/envs/final/lib/python3.6/http/client.py", line 1249, in endheaders self._send_output(message_body, encode_chunked=encode_chunked) File "/home/home/anaconda3/envs/final/lib/python3.6/http/client.py", line 1036, in _send_output self.send(msg) File "/home/home/anaconda3/envs/final/lib/python3.6/http/client.py", line 974, in send self.connect() File "/home/home/anaconda3/envs/final/lib/python3.6/site-packages/urllib3/connection.py", line 184, in connect conn = self._new_conn() File "/home/home/anaconda3/envs/final/lib/python3.6/site-packages/urllib3/connection.py", line 169, in _new_conn self, "Failed to establish a new connection: %s" % e urllib3.exceptions.NewConnectionError: : Failed to establish a new connection: [Errno 111] Connection refused During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/home/anaconda3/envs/final/lib/python3.6/site-packages/requests/adapters.py", line 449, in send timeout=timeout File "/home/home/anaconda3/envs/final/lib/python3.6/site-packages/urllib3/connectionpool.py", line 720, in urlopen method, url, error=e, _pool=self, _stacktrace=sys.exc_info()[2] File "/home/home/anaconda3/envs/final/lib/python3.6/site-packages/urllib3/util/retry.py", line 436, 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(': Failed to establish a new connection: [Errno 111] Connection refused',)) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/home/anaconda3/envs/final/lib/python3.6/site-packages/visdom/__init__.py", line 711, in _send data=json.dumps(msg), File "/home/home/anaconda3/envs/final/lib/python3.6/site-packages/visdom/__init__.py", line 677, in _handle_post r = self.session.post(url, data=data) File "/home/home/anaconda3/envs/final/lib/python3.6/site-packages/requests/sessions.py", line 581, in post return self.request('POST', url, data=data, json=json, **kwargs) File "/home/home/anaconda3/envs/final/lib/python3.6/site-packages/requests/sessions.py", line 533, in request resp = self.send(prep, **send_kwargs) File "/home/home/anaconda3/envs/final/lib/python3.6/site-packages/requests/sessions.py", line 646, in send r = adapter.send(request, **kwargs) File "/home/home/anaconda3/envs/final/lib/python3.6/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(': Failed to establish a new connection: [Errno 111] Connection refused',)) [Errno 111] Connection refused No visdom server found on port 8097. set visdom_port = None WARNING:tensorflow:From /home/home/p10/ext_portrait_segmentation/etc/Tensor_logger.py:38: The name tf.summary.FileWriter is deprecated. Please use tf.compat.v1.summary.FileWriter instead. This data load w = 224 h = 224 scaleIn = 8 This stage is EncTrue Load public Baidu train dataset This num of data is 10160 Load public val dataset This num of data is 0 [107.07112 115.58392 132.43282] [64.25391 65.2699 68.30004] tensor([2.9217, 1.7145]) init_lr: 0.0005 batch_size : 36multistep sch use weight and class 1 logs saved in /Enc_SINet12-31_1654 lr sch: multistep optim method: Adam tf style : True bn-weight : 2.0000000000000003e-06 Flops: 61.65MMac Params: 86.62k Output shape: [1, 1, 28, 28] 86620 ========== Stage 1 TRAINING =========== /home/home/anaconda3/envs/final/lib/python3.6/site-packages/torch/optim/lr_scheduler.py:100: UserWarning: Detected call of `lr_scheduler.step()` before `optimizer.step()`. In PyTorch 1.1.0 and later, you should call them in the opposite order: `optimizer.step()` before `lr_scheduler.step()`. Failure to do this will result in PyTorch skipping the first value of the learning rate schedule.See more details at https://pytorch.org/docs/stable/optim.html#how-to-adjust-learning-rate "https://pytorch.org/docs/stable/optim.html#how-to-adjust-learning-rate", UserWarning) Learning rate: 0.0005 [1/300] loss: 0.536 lossE: 0.388 time:0.11 Traceback (most recent call last): File "main.py", line 251, in lossVal, ElossVal, mIOU_val = val_edge(num_gpu, valLoader, model, criteria, Lovasz) File "/home/home/p10/ext_portrait_segmentation/etc/help_function.py", line 25, in val_edge rand_pick = np.random.randint(0, len(val_loader)) File "mtrand.pyx", line 992, in mtrand.RandomState.randint ValueError: Range cannot be empty (low >= high) unless no samples are taken