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

run code have a mistakes on db = DataLoader(mini, args.task_num, shuffle=True, num_workers=1, pin_memory=True) #33

Open
hongshengxin opened this issue Sep 29, 2019 · 5 comments

Comments

@hongshengxin
Copy link

Traceback (most recent call last):
File "", line 1, in
File "D:\ProgramData\Anaconda3\lib\multiprocessing\spawn.py", line 105, in spawn_main
exitcode = _main(fd)
File "D:\ProgramData\Anaconda3\lib\multiprocessing\spawn.py", line 115, in _main
self = reduction.pickle.load(from_parent)
EOFError: Ran out of input
Traceback (most recent call last):
File "D:\Program Files\JetBrains\PyCharm 2018.2.3\helpers\pydev\pydevd.py", line 1664, in
main()
File "D:\Program Files\JetBrains\PyCharm 2018.2.3\helpers\pydev\pydevd.py", line 1658, in main
globals = debugger.run(setup['file'], None, None, is_module)
File "D:\Program Files\JetBrains\PyCharm 2018.2.3\helpers\pydev\pydevd.py", line 1068, in run
pydev_imports.execfile(file, globals, locals) # execute the script
File "D:\Program Files\JetBrains\PyCharm 2018.2.3\helpers\pydev_pydev_imps_pydev_execfile.py", line 18, in execfile
exec(compile(contents+"\n", file, 'exec'), glob, loc)
File "F:/NLP/meta-learning/MAML-Pytorch/miniimagenet_train.py", line 110, in
main()
File "F:/NLP/meta-learning/MAML-Pytorch/miniimagenet_train.py", line 68, in main
for step, item in enumerate(db):
File "D:\ProgramData\Anaconda3\lib\site-packages\torch\utils\data\dataloader.py", line 819, in iter
return _DataLoaderIter(self)
File "D:\ProgramData\Anaconda3\lib\site-packages\torch\utils\data\dataloader.py", line 560, in init
w.start()
File "D:\ProgramData\Anaconda3\lib\multiprocessing\process.py", line 105, in start
self._popen = self._Popen(self)
File "D:\ProgramData\Anaconda3\lib\multiprocessing\context.py", line 223, in _Popen
return _default_context.get_context().Process._Popen(process_obj)
File "D:\ProgramData\Anaconda3\lib\multiprocessing\context.py", line 322, in _Popen
return Popen(process_obj)
File "D:\ProgramData\Anaconda3\lib\multiprocessing\popen_spawn_win32.py", line 65, in init
reduction.dump(process_obj, to_child)
File "D:\ProgramData\Anaconda3\lib\multiprocessing\reduction.py", line 60, in dump
ForkingPickler(file, protocol).dump(obj)
AttributeError: Can't pickle local object 'MiniImagenet.init..'

@xiaofanque
Copy link

Hi, I have the same mistake, did you solve this?

@howyoungchen
Copy link

did you run it on windows?

@xiaofanque
Copy link

Yes

@asker-github
Copy link

I also have this problem. When num_ workers = 0, the code can run. I don't know if anyone knows a good solution.

@wangtianlei1998
Copy link

''Expected object of scalar type Long but got scalar type Float for argument #2 'target' in call to _thnn_nll_loss_forward''
I have this problem,I don't konw how to solve it?

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