Xiaoqi-Zhao-DLUT / MSNet-M2SNet

(MICCAI 2021) Automatic Polyp Segmentation via Multi-scale Subtraction Network
108 stars 14 forks source link

读取数据时出错:NoneType is not callable #2

Closed scwuchung closed 1 year ago

scwuchung commented 2 years ago

作者你好,在复现代码时遇到点问题想请教,在从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

wangjinkai8611 commented 2 years ago

我也遇到了类似的情况,请问怎么解决?

charlie2w commented 1 year ago

我也遇到了类似的情况,请问怎么解决?

你好,你现在解决这个问题了吗

Xiaoqi-Zhao-DLUT commented 1 year ago

@charlie2w @wangjinkai8611 @scwuchung pytorch 1.8.1 ,python 3.7。 问过好多人,都没问题。

wangjinkai8611 commented 1 year ago

那可能是版本问题吧,我试试