Traceback (most recent call last):
File "train.py", line 220, in
main()
File "train.py", line 172, in main
for i_iter, batch in enumerate(trainloader):
File "/home/faustino/anaconda3/lib/python3.6/site-packages/torch/utils/data/dataloader.py", line 336, in next
return self._process_next_batch(batch)
File "/home/faustino/anaconda3/lib/python3.6/site-packages/torch/utils/data/dataloader.py", line 357, in _process_next_batch
raise batch.exc_type(batch.exc_msg)
TypeError: Traceback (most recent call last):
File "/home/faustino/anaconda3/lib/python3.6/site-packages/torch/utils/data/dataloader.py", line 106, in _worker_loop
samples = collate_fn([dataset[i] for i in batch_indices])
File "/home/faustino/anaconda3/lib/python3.6/site-packages/torch/utils/data/dataloader.py", line 106, in
samples = collate_fn([dataset[i] for i in batch_indices])
File "/home/faustino/PycharmProjects/pythonwork/CE2P-master/dataset/datasets.py", line 63, in getitem
edge[edge==255] = 1
TypeError: 'NoneType' object does not support item assignment
how can i solve this problem?
Traceback (most recent call last): File "train.py", line 220, in
main()
File "train.py", line 172, in main
for i_iter, batch in enumerate(trainloader):
File "/home/faustino/anaconda3/lib/python3.6/site-packages/torch/utils/data/dataloader.py", line 336, in next
return self._process_next_batch(batch)
File "/home/faustino/anaconda3/lib/python3.6/site-packages/torch/utils/data/dataloader.py", line 357, in _process_next_batch
raise batch.exc_type(batch.exc_msg)
TypeError: Traceback (most recent call last):
File "/home/faustino/anaconda3/lib/python3.6/site-packages/torch/utils/data/dataloader.py", line 106, in _worker_loop
samples = collate_fn([dataset[i] for i in batch_indices])
File "/home/faustino/anaconda3/lib/python3.6/site-packages/torch/utils/data/dataloader.py", line 106, in
samples = collate_fn([dataset[i] for i in batch_indices])
File "/home/faustino/PycharmProjects/pythonwork/CE2P-master/dataset/datasets.py", line 63, in getitem
edge[edge==255] = 1
TypeError: 'NoneType' object does not support item assignment
how can i solve this problem?