Closed aldemirfilho closed 2 years ago
Please check the error message, it says from file "/content/drive/MyDrive/Pibic/DeepSEED-3D-ConvNets-for-Pulmonary-Nodule-Detection-master/luna_detector/data_loader.py", line 119, in getitem: xx,yy,zz = np.meshgrid(np.linspace(-0.5,0.5,imgs.shape[1]/self.stride) has the typeError: 'float' object cannot be interpreted as an integer
So your imgs.shape[1]/self.stride is not an integer.
Thanks!
@aldemirfilho Are you find the problem?
@aldemirfilho Está achando o problema?
necessary to do an integer conversion on these float values. int(value_float)
Do you have any guidance for the following errors in the training step?
Traceback (most recent call last): File "train_detector_se.py", line 340, in
main()
File "train_detector_se.py", line 121, in main
test(test_loader, net, get_pbb, save_dir,config)
File "train_detector_se.py", line 257, in test
for i_name, (data, target, coord, nzhw) in enumerate(data_loader):
File "/usr/local/lib/python3.7/dist-packages/torch/utils/data/dataloader.py", line 521, in next
data = self._next_data()
File "/usr/local/lib/python3.7/dist-packages/torch/utils/data/dataloader.py", line 1203, in _next_data
return self._process_data(data)
File "/usr/local/lib/python3.7/dist-packages/torch/utils/data/dataloader.py", line 1229, in _process_data
data.reraise()
File "/usr/local/lib/python3.7/dist-packages/torch/_utils.py", line 434, in reraise
raise exception
TypeError: Caught TypeError in DataLoader worker process 0.
Original Traceback (most recent call last):
File "/usr/local/lib/python3.7/dist-packages/torch/utils/data/_utils/worker.py", line 287, in _worker_loop
data = fetcher.fetch(index)
File "/usr/local/lib/python3.7/dist-packages/torch/utils/data/_utils/fetch.py", line 49, in fetch
data = [self.dataset[idx] for idx in possibly_batched_index]
File "/usr/local/lib/python3.7/dist-packages/torch/utils/data/_utils/fetch.py", line 49, in
data = [self.dataset[idx] for idx in possibly_batched_index]
File "/content/drive/MyDrive/Pibic/DeepSEED-3D-ConvNets-for-Pulmonary-Nodule-Detection-master/luna_detector/data_loader.py", line 119, in getitem
xx,yy,zz = np.meshgrid(np.linspace(-0.5,0.5,imgs.shape[1]/self.stride),
File "<__array_function__ internals>", line 6, in linspace
File "/usr/local/lib/python3.7/dist-packages/numpy/core/function_base.py", line 113, in linspace
num = operator.index(num)
TypeError: 'float' object cannot be interpreted as an integer
Thanks!