作者你好,在复现代码时遇到点问题想请教,在从dataloader中读取数据时出错:NoneType is not callable,查看loader的长度是正确的,数据应该是读进去了,顺便问一下这份代码的环境配置是怎样的,谢谢。
Traceback (most recent call last):
File "D:/WH/MSNet-main/train.py", line 80, in
train(dataset_medical, MSNet, LossNet)
File "D:/WH/MSNet-main/train.py", line 60, in train
for step, (image, mask) in enumerate(loader):
File "C:\ProgramData\Anaconda3\envs\MSNet\lib\site-packages\torch\utils\data\dataloader.py", line 352, in iter
return self._get_iterator()
File "C:\ProgramData\Anaconda3\envs\MSNet\lib\site-packages\torch\utils\data\dataloader.py", line 294, in _get_iterator
return _MultiProcessingDataLoaderIter(self)
File "C:\ProgramData\Anaconda3\envs\MSNet\lib\site-packages\torch\utils\data\dataloader.py", line 801, in init
w.start()
File "C:\ProgramData\Anaconda3\envs\MSNet\lib\multiprocessing\process.py", line 105, in start
self._popen = self._Popen(self)
File "C:\ProgramData\Anaconda3\envs\MSNet\lib\multiprocessing\context.py", line 223, in _Popen
return _default_context.get_context().Process._Popen(process_obj)
File "C:\ProgramData\Anaconda3\envs\MSNet\lib\multiprocessing\context.py", line 322, in _Popen
return Popen(process_obj)
File "C:\ProgramData\Anaconda3\envs\MSNet\lib\multiprocessing\popen_spawn_win32.py", line 65, in init
reduction.dump(process_obj, to_child)
File "C:\ProgramData\Anaconda3\envs\MSNet\lib\multiprocessing\reduction.py", line 60, in dump
ForkingPickler(file, protocol).dump(obj)
TypeError: 'NoneType' object is not callable
作者你好,在复现代码时遇到点问题想请教,在从dataloader中读取数据时出错:NoneType is not callable,查看loader的长度是正确的,数据应该是读进去了,顺便问一下这份代码的环境配置是怎样的,谢谢。 Traceback (most recent call last): File "D:/WH/MSNet-main/train.py", line 80, in
train(dataset_medical, MSNet, LossNet)
File "D:/WH/MSNet-main/train.py", line 60, in train
for step, (image, mask) in enumerate(loader):
File "C:\ProgramData\Anaconda3\envs\MSNet\lib\site-packages\torch\utils\data\dataloader.py", line 352, in iter
return self._get_iterator()
File "C:\ProgramData\Anaconda3\envs\MSNet\lib\site-packages\torch\utils\data\dataloader.py", line 294, in _get_iterator
return _MultiProcessingDataLoaderIter(self)
File "C:\ProgramData\Anaconda3\envs\MSNet\lib\site-packages\torch\utils\data\dataloader.py", line 801, in init
w.start()
File "C:\ProgramData\Anaconda3\envs\MSNet\lib\multiprocessing\process.py", line 105, in start
self._popen = self._Popen(self)
File "C:\ProgramData\Anaconda3\envs\MSNet\lib\multiprocessing\context.py", line 223, in _Popen
return _default_context.get_context().Process._Popen(process_obj)
File "C:\ProgramData\Anaconda3\envs\MSNet\lib\multiprocessing\context.py", line 322, in _Popen
return Popen(process_obj)
File "C:\ProgramData\Anaconda3\envs\MSNet\lib\multiprocessing\popen_spawn_win32.py", line 65, in init
reduction.dump(process_obj, to_child)
File "C:\ProgramData\Anaconda3\envs\MSNet\lib\multiprocessing\reduction.py", line 60, in dump
ForkingPickler(file, protocol).dump(obj)
TypeError: 'NoneType' object is not callable