You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "train.py", line 2, in <module>
main(mode=1)
File "C:\Users\Sicily\edge-connect\main.py", line 56, in main
File "D:\Anaconda\lib\multiprocessing\spawn.py", line 105, in spawn_main
model.train()
exitcode = _main(fd) File "C:\Users\Sicily\edge-connect\src\edge_connect.py", line 98, in train
File "D:\Anaconda\lib\multiprocessing\spawn.py", line 114, in _main
for items in train_loader:
prepare(preparation_data) File "D:\Anaconda\lib\site-packages\torch\utils\data\dataloader.py", line 352, in __iter__
File "D:\Anaconda\lib\multiprocessing\spawn.py", line 225, in prepare
return self._get_iterator()_fixup_main_from_path(data['init_main_from_path'])
File "D:\Anaconda\lib\site-packages\torch\utils\data\dataloader.py", line 294, in _get_iterator
File "D:\Anaconda\lib\multiprocessing\spawn.py", line 277, in _fixup_main_from_path
return _MultiProcessingDataLoaderIter(self)run_name="__mp_main__")
File "D:\Anaconda\lib\site-packages\torch\utils\data\dataloader.py", line 801, in __init__
File "D:\Anaconda\lib\runpy.py", line 263, in run_path
w.start()
pkg_name=pkg_name, script_name=fname) File "D:\Anaconda\lib\multiprocessing\process.py", line 112, in start
File "D:\Anaconda\lib\runpy.py", line 96, in _run_module_code
self._popen = self._Popen(self)mod_name, mod_spec, pkg_name, script_name)
File "D:\Anaconda\lib\multiprocessing\context.py", line 223, in _Popen
File "D:\Anaconda\lib\runpy.py", line 85, in _run_code
return _default_context.get_context().Process._Popen(process_obj)
File "D:\Anaconda\lib\multiprocessing\context.py", line 322, in _Popen
exec(code, run_globals)
return Popen(process_obj) File "C:\Users\Sicily\edge-connect\train.py", line 2, in <module>
File "D:\Anaconda\lib\multiprocessing\popen_spawn_win32.py", line 65, in __init__
main(mode=1)
reduction.dump(process_obj, to_child) File "C:\Users\Sicily\edge-connect\main.py", line 56, in main
File "D:\Anaconda\lib\multiprocessing\reduction.py", line 60, in dump
model.train()
File "C:\Users\Sicily\edge-connect\src\edge_connect.py", line 98, in train
ForkingPickler(file, protocol).dump(obj)
for items in train_loader:BrokenPipeError
: File "D:\Anaconda\lib\site-packages\torch\utils\data\dataloader.py", line 352, in __iter__
[Errno 32] Broken pipe
return self._get_iterator()
File "D:\Anaconda\lib\site-packages\torch\utils\data\dataloader.py", line 294, in _get_iterator
return _MultiProcessingDataLoaderIter(self)
File "D:\Anaconda\lib\site-packages\torch\utils\data\dataloader.py", line 801, in __init__
w.start()
File "D:\Anaconda\lib\multiprocessing\process.py", line 112, in start
self._popen = self._Popen(self)
File "D:\Anaconda\lib\multiprocessing\context.py", line 223, in _Popen
return _default_context.get_context().Process._Popen(process_obj)
File "D:\Anaconda\lib\multiprocessing\context.py", line 322, in _Popen
return Popen(process_obj)
File "D:\Anaconda\lib\multiprocessing\popen_spawn_win32.py", line 33, in __init__
prep_data = spawn.get_preparation_data(process_obj._name)
File "D:\Anaconda\lib\multiprocessing\spawn.py", line 143, in get_preparation_data
_check_not_importing_main()
File "D:\Anaconda\lib\multiprocessing\spawn.py", line 136, in _check_not_importing_main
is not going to be frozen to produce an executable.''')
RuntimeError:
An attempt has been made to start a new process before the
current process has finished its bootstrapping phase.
This probably means that you are not using fork to start your
child processes and you have forgotten to use the proper idiom
in the main module:
if __name__ == '__main__':
freeze_support()
...
The "freeze_support()" line can be omitted if the program
is not going to be frozen to produce an executable
I tried placing this code at the beginning
if __name__ == "__main__":
main()
And then indenting everything else below it in the main.py file. However, this also doesn't work, does anyone have any other workarounds they could suggest?
I would be forever grateful!
The text was updated successfully, but these errors were encountered:
Hi there,
Has anyone run the train.py file in Windows 10?
I keep getting the following traceback:
I tried placing this code at the beginning
And then indenting everything else below it in the main.py file. However, this also doesn't work, does anyone have any other workarounds they could suggest?
I would be forever grateful!
The text was updated successfully, but these errors were encountered: