pytorch-slimming icon indicating copy to clipboard operation
pytorch-slimming copied to clipboard

这个代码需要torch哪个版本?

Open Salary-only-17k opened this issue 4 years ago • 4 comments

我的是'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,这个代码有人跑通了吗?效果如何?

Salary-only-17k avatar Aug 17 '20 09:08 Salary-only-17k

BrokenPipeError: [Errno 32] Broken pipe

Salary-only-17k avatar Aug 17 '20 09:08 Salary-only-17k

找到原因了 是win的多进程问题

Salary-only-17k avatar Aug 17 '20 12:08 Salary-only-17k

我的是'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,这个代码有人跑通了吗?效果如何?

我跑通了,里面有个版本报错。我用这位大神的方法改对了 image https://github.com/NVIDIA/flownet2-pytorch/issues/113#issuecomment-450802359

Aixining avatar Sep 28 '20 01:09 Aixining

我这个没跑通原因torch在win和linux多线程是不一样的。这里的代码是linux版的,我用是win环境。改一下就行了。

Salary-only-17k avatar Sep 28 '20 01:09 Salary-only-17k