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

the porblem of training the model #23

Open
guangqianqin opened this issue Jul 1, 2019 · 3 comments
Open

the porblem of training the model #23

guangqianqin opened this issue Jul 1, 2019 · 3 comments

Comments

@guangqianqin
Copy link

L:\Anaconda\envs\py3\python.exe E:/Gavin/SiamFC-PyTorch-master/siamfc/train.py
0%| | 0/6650 [00:00<?, ?it/s]Traceback (most recent call last):
File "E:/Gavin/SiamFC-PyTorch-master/siamfc/train.py", line 135, in
train(0 , 'E:\Gavin\data\ILSVRC_VID_CURATION')
File "E:/Gavin/SiamFC-PyTorch-master/siamfc/train.py", line 101, in train
for i, data in enumerate(tqdm(trainloader)):
File "L:\Anaconda\envs\py3\lib\site-packages\tqdm_tqdm.py", line 1005, in iter
for obj in iterable:
File "L:\Anaconda\envs\py3\lib\site-packages\torch\utils\data\dataloader.py", line 501, in iter
return _DataLoaderIter(self)
File "L:\Anaconda\envs\py3\lib\site-packages\torch\utils\data\dataloader.py", line 289, in init
w.start()
File "L:\Anaconda\envs\py3\lib\multiprocessing\process.py", line 105, in start
self._popen = self._Popen(self)
File "L:\Anaconda\envs\py3\lib\multiprocessing\context.py", line 212, in _Popen
return _default_context.get_context().Process._Popen(process_obj)
File "L:\Anaconda\envs\py3\lib\multiprocessing\context.py", line 313, in _Popen
return Popen(process_obj)
File "L:\Anaconda\envs\py3\lib\multiprocessing\popen_spawn_win32.py", line 66, in init
reduction.dump(process_obj, to_child)
File "L:\Anaconda\envs\py3\lib\multiprocessing\reduction.py", line 59, in dump
ForkingPickler(file, protocol).dump(obj)
_pickle.PicklingError: Can't pickle <class 'Transaction'>: attribute lookup Transaction on builtins failed
Traceback (most recent call last):
File "", line 1, in
File "L:\Anaconda\envs\py3\lib\multiprocessing\spawn.py", line 106, in spawn_main
exitcode = _main(fd)
File "L:\Anaconda\envs\py3\lib\multiprocessing\spawn.py", line 116, in _main
self = pickle.load(from_parent)
EOFError: Ran out of input

@mellthebs
Copy link

Run this program in linux would fix it, pytorch implements different solutions in function DataLoaderIter ,so it can't work well in windows.

@guangqianqin
Copy link
Author

guangqianqin commented Jul 27, 2019 via email

@briliantnugraha
Copy link

Hi, in case that you are still interested to run it in Windows 10 again.
Here is a tested solution ( I have tested it on 3 PC with AMD/intel CPU and NVIDIA GPUS, so just give it a shot...).

To fix the issue, change your num_worker in config.py to 0 so that it will use the main thread (only one process) ->(multithreading/process related error is a common issue in Window).

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

3 participants