Closed joinusers closed 8 months ago
This problem is related with the dataset class. You can write a script to load data with the raw dataset instead wrapped up with dataloader. It shows the collation function in the dataloader got wrong. It guess it loads empty data. Usually this kind of problem is not a big one.
Something wrong happened in this ,I have on idea about it.
Traceback (most recent call last):
main()
File "/home/jovyan/anaconda3/envs/SimpleNet/lib/python3.8/site-packages/click/core.py", line 1157, in call
return self.main(args, kwargs)
File "/home/jovyan/anaconda3/envs/SimpleNet/lib/python3.8/site-packages/click/core.py", line 1078, in main
rv = self.invoke(ctx)
File "/home/jovyan/anaconda3/envs/SimpleNet/lib/python3.8/site-packages/click/core.py", line 1720, in invoke
return _process_result(rv)
File "/home/jovyan/anaconda3/envs/SimpleNet/lib/python3.8/site-packages/click/core.py", line 1657, in _process_result
value = ctx.invoke(self._result_callback, value, ctx.params)
File "/home/jovyan/anaconda3/envs/SimpleNet/lib/python3.8/site-packages/click/core.py", line 783, in invoke
return __callback(args, *kwargs)
File "main.py", line 93, in run
i_auroc, p_auroc, pro_auroc = SimpleNet.train(dataloaders["training"], dataloaders["testing"])
File "/home/jovyan/SimpleNet-main/simplenet.py", line 420, in train
scores, segmentations, features, labels_gt, masks_gt = self.predict(test_data)
File "/home/jovyan/SimpleNet-main/simplenet.py", line 540, in predict
return self._predict_dataloader(data, prefix)
File "/home/jovyan/SimpleNet-main/simplenet.py", line 557, in _predict_dataloader
for data in data_iterator:
File "/home/jovyan/anaconda3/envs/SimpleNet/lib/python3.8/site-packages/tqdm/std.py", line 1182, in iter
for obj in iterable:
File "/home/jovyan/anaconda3/envs/SimpleNet/lib/python3.8/site-packages/torch/utils/data/dataloader.py", line 681, in next
data = self._next_data()
File "/home/jovyan/anaconda3/envs/SimpleNet/lib/python3.8/site-packages/torch/utils/data/dataloader.py", line 1376, in _next_data
return self._process_data(data)
File "/home/jovyan/anaconda3/envs/SimpleNet/lib/python3.8/site-packages/torch/utils/data/dataloader.py", line 1402, in _process_data
data.reraise()
File "/home/jovyan/anaconda3/envs/SimpleNet/lib/python3.8/site-packages/torch/_utils.py", line 461, in reraise
raise exception
RuntimeError: Caught RuntimeError in DataLoader worker process 0.
Original Traceback (most recent call last):
File "/home/jovyan/anaconda3/envs/SimpleNet/lib/python3.8/site-packages/torch/utils/data/_utils/worker.py", line 302, in _worker_loop
data = fetcher.fetch(index)
File "/home/jovyan/anaconda3/envs/SimpleNet/lib/python3.8/site-packages/torch/utils/data/_utils/fetch.py", line 52, in fetch
return self.collate_fn(data)
File "/home/jovyan/anaconda3/envs/SimpleNet/lib/python3.8/site-packages/torch/utils/data/_utils/collate.py", line 160, in default_collate
return elem_type({key: default_collate([d[key] for d in batch]) for key in elem})
File "/home/jovyan/anaconda3/envs/SimpleNet/lib/python3.8/site-packages/torch/utils/data/_utils/collate.py", line 160, in
return elem_type({key: default_collate([d[key] for d in batch]) for key in elem})
File "/home/jovyan/anaconda3/envs/SimpleNet/lib/python3.8/site-packages/torch/utils/data/_utils/collate.py", line 140, in defaultcollate
out = elem.new(storage).resize(len(batch), list(elem.size()))
RuntimeError: Trying to resize storage that is not resizable
File "main.py", line 356, in