使用自己COCO数据集出现了以下错误:Traceback (most recent call last):
File "train_net.py", line 85, in
main()
File "train_net.py", line 76, in main
train(cfg, network)
File "train_net.py", line 54, in train
trainer.train(epoch, train_loader, optimizer, recorder)
File "D:\PythonProject\PolySnake-master\lib\train\trainers\trainer.py", line 33, in train
for iteration, batch in enumerate(data_loader):
File "C:\Users\cwnu\anaconda3\envs\polysnake\lib\site-packages\torch\utils\data\dataloader.py", line 359, in iter
return self._get_iterator()
File "C:\Users\cwnu\anaconda3\envs\polysnake\lib\site-packages\torch\utils\data\dataloader.py", line 305, in _get_iterator
return _MultiProcessingDataLoaderIter(self)
File "C:\Users\cwnu\anaconda3\envs\polysnake\lib\site-packages\torch\utils\data\dataloader.py", line 918, in init
w.start()
File "C:\Users\cwnu\anaconda3\envs\polysnake\lib\multiprocessing\process.py", line 112, in start
self._popen = self._Popen(self)
File "C:\Users\cwnu\anaconda3\envs\polysnake\lib\multiprocessing\context.py", line 223, in _Popen
return _default_context.get_context().Process._Popen(process_obj)
File "C:\Users\cwnu\anaconda3\envs\polysnake\lib\multiprocessing\context.py", line 322, in _Popen
return Popen(process_obj)
File "C:\Users\cwnu\anaconda3\envs\polysnake\lib\multiprocessing\popen_spawn_win32.py", line 89, in init
reduction.dump(process_obj, to_child)
File "C:\Users\cwnu\anaconda3\envs\polysnake\lib\multiprocessing\reduction.py", line 60, in dump
ForkingPickler(file, protocol).dump(obj)
_pickle.PicklingError: Can't pickle <class 'lib.datasets.coco.snake.Dataset'>: it's not the same object as lib.datasets.coco.snake.Dataset
使用自己COCO数据集出现了以下错误:Traceback (most recent call last): File "train_net.py", line 85, in
main()
File "train_net.py", line 76, in main
train(cfg, network)
File "train_net.py", line 54, in train
trainer.train(epoch, train_loader, optimizer, recorder)
File "D:\PythonProject\PolySnake-master\lib\train\trainers\trainer.py", line 33, in train
for iteration, batch in enumerate(data_loader):
File "C:\Users\cwnu\anaconda3\envs\polysnake\lib\site-packages\torch\utils\data\dataloader.py", line 359, in iter
return self._get_iterator()
File "C:\Users\cwnu\anaconda3\envs\polysnake\lib\site-packages\torch\utils\data\dataloader.py", line 305, in _get_iterator
return _MultiProcessingDataLoaderIter(self)
File "C:\Users\cwnu\anaconda3\envs\polysnake\lib\site-packages\torch\utils\data\dataloader.py", line 918, in init
w.start()
File "C:\Users\cwnu\anaconda3\envs\polysnake\lib\multiprocessing\process.py", line 112, in start
self._popen = self._Popen(self)
File "C:\Users\cwnu\anaconda3\envs\polysnake\lib\multiprocessing\context.py", line 223, in _Popen
return _default_context.get_context().Process._Popen(process_obj)
File "C:\Users\cwnu\anaconda3\envs\polysnake\lib\multiprocessing\context.py", line 322, in _Popen
return Popen(process_obj)
File "C:\Users\cwnu\anaconda3\envs\polysnake\lib\multiprocessing\popen_spawn_win32.py", line 89, in init
reduction.dump(process_obj, to_child)
File "C:\Users\cwnu\anaconda3\envs\polysnake\lib\multiprocessing\reduction.py", line 60, in dump
ForkingPickler(file, protocol).dump(obj)
_pickle.PicklingError: Can't pickle <class 'lib.datasets.coco.snake.Dataset'>: it's not the same object as lib.datasets.coco.snake.Dataset
不知道该怎么解决这个问题。