Open Crayon1996 opened 5 years ago
/home/dongbo/anaconda3/lib/python3.7/site-packages/torch/nn/_reduction.py:49: UserWarning: size_average and reduce args will be deprecated, please use reduction='none' instead. warnings.warn(warning.format(ret)) Epoch: [0/30][0/49006] Time 3.022 (avg:3.022) Loss 3202.693115 (avg:3202.693115) Traceback (most recent call last): File "train_RCF.py", line 340, in main() File "train_RCF.py", line 212, in main save_dir = join(TMP_DIR, 'epoch-%d-training-record' % epoch)) File "train_RCF.py", line 239, in train for i, (image, label) in enumerate(train_loader): File "/home/dongbo/anaconda3/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 637, in next return self._process_next_batch(batch) File "/home/dongbo/anaconda3/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 658, in _process_next_batch raise batch.exc_type(batch.exc_msg) ValueError: Traceback (most recent call last): File "/home/dongbo/anaconda3/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 138, in _worker_loop samples = collate_fn([dataset[i] for i in batch_indices]) File "/home/dongbo/anaconda3/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 138, in samples = collate_fn([dataset[i] for i in batch_indices]) File "/home/dongbo/RCF-pytorch/data_loader.py", line 59, in getitem img = prepare_image_cv2(img) File "/home/dongbo/RCF-pytorch/data_loader.py", line 17, in prepare_image_cv2 im -= np.array((104.00698793,116.66876762,122.67891434)) ValueError: non-broadcastable output operand with shape () doesn't match the broadcast shape (3,)
did you solve it?
/home/dongbo/anaconda3/lib/python3.7/site-packages/torch/nn/_reduction.py:49: UserWarning: size_average and reduce args will be deprecated, please use reduction='none' instead. warnings.warn(warning.format(ret)) Epoch: [0/30][0/49006] Time 3.022 (avg:3.022) Loss 3202.693115 (avg:3202.693115) Traceback (most recent call last): File "train_RCF.py", line 340, in
main()
File "train_RCF.py", line 212, in main
save_dir = join(TMP_DIR, 'epoch-%d-training-record' % epoch))
File "train_RCF.py", line 239, in train
for i, (image, label) in enumerate(train_loader):
File "/home/dongbo/anaconda3/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 637, in next
return self._process_next_batch(batch)
File "/home/dongbo/anaconda3/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 658, in _process_next_batch
raise batch.exc_type(batch.exc_msg)
ValueError: Traceback (most recent call last):
File "/home/dongbo/anaconda3/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 138, in _worker_loop
samples = collate_fn([dataset[i] for i in batch_indices])
File "/home/dongbo/anaconda3/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 138, in
samples = collate_fn([dataset[i] for i in batch_indices])
File "/home/dongbo/RCF-pytorch/data_loader.py", line 59, in getitem
img = prepare_image_cv2(img)
File "/home/dongbo/RCF-pytorch/data_loader.py", line 17, in prepare_image_cv2
im -= np.array((104.00698793,116.66876762,122.67891434))
ValueError: non-broadcastable output operand with shape () doesn't match the broadcast shape (3,)