Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problems that occur during training or evaluation AttributeError: Can't pickle local object 'DatasetBase.__init__.<locals>.<lambda>' #58

Open
jxy004 opened this issue Aug 9, 2024 · 0 comments

Comments

@jxy004
Copy link

jxy004 commented Aug 9, 2024

Traceback (most recent call last):
File "D:\download\ESANet-maingai\ESANet-main\train.py", line 552, in
train_main()
File "D:\download\ESANet-maingai\ESANet-main\train.py", line 204, in train_main
label_downsampling_rates, debug_mode=args.debug)
File "D:\download\ESANet-maingai\ESANet-main\train.py", line 276, in train_one_epoch
for i, sample in enumerate(train_loader):
File "D:\anaconda\envs\esa\lib\site-packages\torch\utils\data\dataloader.py", line 435, in iter
return self._get_iterator()
File "D:\anaconda\envs\esa\lib\site-packages\torch\utils\data\dataloader.py", line 381, in _get_iterator
return _MultiProcessingDataLoaderIter(self)
File "D:\anaconda\envs\esa\lib\site-packages\torch\utils\data\dataloader.py", line 1034, in init
w.start()
File "D:\anaconda\envs\esa\lib\multiprocessing\process.py", line 112, in start
self._popen = self._Popen(self)
File "D:\anaconda\envs\esa\lib\multiprocessing\context.py", line 223, in _Popen
return _default_context.get_context().Process._Popen(process_obj)
File "D:\anaconda\envs\esa\lib\multiprocessing\context.py", line 322, in _Popen
return Popen(process_obj)
File "D:\anaconda\envs\esa\lib\multiprocessing\popen_spawn_win32.py", line 89, in init
reduction.dump(process_obj, to_child)
File "D:\anaconda\envs\esa\lib\multiprocessing\reduction.py", line 60, in dump
ForkingPickler(file, protocol).dump(obj)
AttributeError: Can't pickle local object 'DatasetBase.init..'
The above errors occurred during the evaluation and training. I have configured the data set and pre-training weights, but I do not know how to modify them to solve this problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant