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

AttributeError: Can't pickle local object 'make_dataset.<locals>.Config' #12

Closed
opentld opened this issue Oct 1, 2019 · 5 comments
Closed

Comments

@opentld
Copy link

opentld commented Oct 1, 2019

error when running demo_view.py

Personalization: meta cycle finetune...
load face model from assets/pretrains/sphere20a_20171020.pth
0%| | 0/5 [00:00<?, ?it/s]Traceback (most recent call last):
File "demo_view.py", line 179, in
generate_orig_pose_novel_view_result(opt, src_path)
File "demo_view.py", line 117, in generate_orig_pose_novel_view_result
adaptive_personalize(opt, viewer, visualizer)
File "E:\SourceCodes\tensorflow\Gans\impersonator-master\run_imitator.py", line 209, in adaptive_personalize
imitator.post_personalize(opt.output_dir, loader, visualizer=None, verbose=False)
File "E:\SourceCodes\tensorflow\Gans\impersonator-master\models\viewer.py", line 395, in post_personalize
for i, sample in enumerate(data_loader):
File "D:\DevelopTools\Anaconda3\envs\tensorflow_gpu\lib\site-packages\torch\utils\data\dataloader.py", line 278, in iter
return _MultiProcessingDataLoaderIter(self)
File "D:\DevelopTools\Anaconda3\envs\tensorflow_gpu\lib\site-packages\torch\utils\data\dataloader.py", line 682, in init
w.start()
File "D:\DevelopTools\Anaconda3\envs\tensorflow_gpu\lib\multiprocessing\process.py", line 105, in start
self._popen = self._Popen(self)
File "D:\DevelopTools\Anaconda3\envs\tensorflow_gpu\lib\multiprocessing\context.py", line 223, in _Popen
return _default_context.get_context().Process._Popen(process_obj)
File "D:\DevelopTools\Anaconda3\envs\tensorflow_gpu\lib\multiprocessing\context.py", line 322, in _Popen
return Popen(process_obj)
File "D:\DevelopTools\Anaconda3\envs\tensorflow_gpu\lib\multiprocessing\popen_spawn_win32.py", line 65, in init
reduction.dump(process_obj, to_child)
File "D:\DevelopTools\Anaconda3\envs\tensorflow_gpu\lib\multiprocessing\reduction.py", line 60, in dump
ForkingPickler(file, protocol).dump(obj)
AttributeError: Can't pickle local object 'make_dataset..Config'

@us
Copy link

us commented Oct 1, 2019

I got same error.

@piaozhx
Copy link
Member

piaozhx commented Oct 1, 2019

Try changing num_worker to 0 in run_imitator.py:191

# num_workers=4
num_workers=0

it probably caused by compatible problem of multiprocessing in windows

@us
Copy link

us commented Oct 2, 2019

@piaozhx Thanks but now giving out of memory error.

RuntimeError: CUDA out of memory. Tried to allocate 16.00 MiB (GPU 0; 8.00 GiB total capacity; 6.18 GiB already allocated; 13.16 MiB free; 159.61 MiB cached)

@us
Copy link

us commented Oct 2, 2019

Thanks! @piaozhx

@azyslzp
Copy link

azyslzp commented Jan 8, 2020

I tried num_workers=0, but the error is the same

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

5 participants