ConnectionResetError: [Errno 104] Connection reset by peer

Traceback (most recent call last):
  File "/root/autodl-tmp/siamFC/tools/train.py", line 13, in
    tracker.train_over(seqs)
  File "/root/miniconda3/lib/python3.7/site-packages/torch/autograd/grad_mode.py", line 87, in decorate_enable_grad
    return func(*args, **kwargs)
  File "/root/autodl-tmp/siamFC/siamfc/siamfc.py", line 295, in train_over
    for it, batch in enumerate(dataloader):
  File "/root/miniconda3/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 568, in __next__
    return self._process_next_batch(batch)
  File "/root/miniconda3/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 608, in _process_next_batch
    raise batch.exc_type(batch.exc_msg)
AssertionError: Traceback (most recent call last):
  File "/root/miniconda3/lib/python3.7/site-packages/torch/utils/data/_utils/worker.py", line 99, in _worker_loop
    samples = collate_fn([dataset[i] for i in batch_indices])
  File "/root/miniconda3/lib/python3.7/site-packages/torch/utils/data/_utils/worker.py", line 99, in
    samples = collate_fn([dataset[i] for i in batch_indices])
  File "/root/autodl-tmp/siamFC/siamfc/datasets.py", line 27, in __getitem__
    img_files, anno, meta = self.seqs[index]
  File "/root/miniconda3/lib/python3.7/site-packages/got10k/datasets/got10k.py", line 66, in __getitem__
    assert len(img_files) == len(anno)
AssertionError

Exception in thread Thread-1:
Traceback (most recent call last):
  File "/root/miniconda3/lib/python3.7/threading.py", line 926, in _bootstrap_inner
    self.run()
  File "/root/miniconda3/lib/python3.7/threading.py", line 870, in run
    self._target(*self._args, **self._kwargs)
  File "/root/miniconda3/lib/python3.7/site-packages/torch/utils/data/_utils/pin_memory.py", line 21, in _pin_memory_loop
    r = in_queue.get(timeout=MP_STATUS_CHECK_INTERVAL)
  File "/root/miniconda3/lib/python3.7/multiprocessing/queues.py", line 113, in get
    return _ForkingPickler.loads(res)
  File "/root/miniconda3/lib/python3.7/site-packages/torch/multiprocessing/reductions.py", line 276, in rebuild_storage_fd
    fd = df.detach()
  File "/root/miniconda3/lib/python3.7/multiprocessing/resource_sharer.py", line 57, in detach
    with _resource_sharer.get_connection(self._id) as conn:
  File "/root/miniconda3/lib/python3.7/multiprocessing/resource_sharer.py", line 87, in get_connection
    c = Client(address, authkey=process.current_process().authkey)
  File "/root/miniconda3/lib/python3.7/multiprocessing/connection.py", line 498, in Client
    answer_challenge(c, authkey)
  File "/root/miniconda3/lib/python3.7/multiprocessing/connection.py", line 742, in answer_challenge
    message = connection.recv_bytes(256)         # reject large message
  File "/root/miniconda3/lib/python3.7/multiprocessing/connection.py", line 216, in recv_bytes
    buf = self._recv_bytes(maxlength)
  File "/root/miniconda3/lib/python3.7/multiprocessing/connection.py", line 407, in _recv_bytes
    buf = self._recv(4)
  File "/root/miniconda3/lib/python3.7/multiprocessing/connection.py", line 379, in _recv
    chunk = read(handle, remaining)
ConnectionResetError: [Errno 104] Connection reset by peer

加了

import time
time.sleep(0.5)#放慢请求问题速度

后,第二段问题没了,第一段问题还在

你可能感兴趣的:(python,深度学习,开发语言)