pytorch-slimming
pytorch-slimming copied to clipboard
这个代码需要torch哪个版本?
我的是'1.5.0+cu92',一直报错。 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.
没有过torch,这个代码有人跑通了吗?效果如何?
BrokenPipeError: [Errno 32] Broken pipe
找到原因了 是win的多进程问题
我的是'1.5.0+cu92',一直报错。 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.
没有过torch,这个代码有人跑通了吗?效果如何?
我跑通了,里面有个版本报错。我用这位大神的方法改对了
https://github.com/NVIDIA/flownet2-pytorch/issues/113#issuecomment-450802359
我这个没跑通原因torch在win和linux多线程是不一样的。这里的代码是linux版的,我用是win环境。改一下就行了。