princeton-vl / pytorch_stacked_hourglass

Pytorch implementation of the ECCV 2016 paper "Stacked Hourglass Networks for Human Pose Estimation"
BSD 3-Clause "New" or "Revised" License
465 stars 94 forks source link

Please help me with the problem when running train.py #53

Closed 12gfd closed 3 months ago

12gfd commented 3 months ago

Thank you for sharing the code, but the following error occurred when I tried to run the source code: TypeError: cannot pickle 'module' object and EOFError: Ran out of input I'm not quite sure how the first error came about, I tried to fix it but it didn't work

12gfd commented 3 months ago

The overall error at runtime is as follows (bishePytorch2) PS F:\pytorch_stacked_hourglass-master> python train.py -e test_run_001 loading data... Done (t=4.43s) epoch: 0 start train test_run_001 0%| | 0/1000 [00:00<?, ?it/s] Traceback (most recent call last): File "train.py", line 134, in main() File "train.py", line 130, in main train(func, data_func, config) File "train.py", line 100, in train datas = next(generator) File "F:\pytorch_stacked_hourglass-master\data\MPII\dp.py", line 153, in gen loader = loaders[phase].iter()#创建数据加载器并初始化 File "D:\anaconda\envs\bishePytorch2\lib\site-packages\torch\utils\data\dataloader.py", line 279, in iter return _MultiProcessingDataLoaderIter(self) File "D:\anaconda\envs\bishePytorch2\lib\site-packages\torch\utils\data\dataloader.py", line 719, in init w.start() File "D:\anaconda\envs\bishePytorch2\lib\multiprocessing\process.py", line 121, in start self._popen = self._Popen(self) File "D:\anaconda\envs\bishePytorch2\lib\multiprocessing\context.py", line 224, in _Popen return _default_context.get_context().Process._Popen(process_obj) File "D:\anaconda\envs\bishePytorch2\lib\multiprocessing\context.py", line 327, in _Popen return Popen(process_obj) File "D:\anaconda\envs\bishePytorch2\lib\multiprocessing\popen_spawn_win32.py", line 93, in init reduction.dump(process_obj, to_child) File "D:\anaconda\envs\bishePytorch2\lib\multiprocessing\reduction.py", line 60, in dump ForkingPickler(file, protocol).dump(obj) ####dump(obj) TypeError: cannot pickle 'module' object (bishePytorch2) PS F:\pytorch_stacked_hourglass-master> (bishePytorch2) PS F:\pytorch_stacked_hourglass-master> Traceback (most recent call last): File "", line 1, in File "D:\anaconda\envs\bishePytorch2\lib\multiprocessing\spawn.py", line 116, in spawn_main exitcode = _main(fd, parent_sentinel) File "D:\anaconda\envs\bishePytorch2\lib\multiprocessing\spawn.py", line 126, in _main self = reduction.pickle.load(from_parent) EOFError: Ran out of input