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

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

Open
Salary-only-17k opened this issue Aug 17, 2020 · 4 comments
Open

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

Salary-only-17k opened this issue Aug 17, 2020 · 4 comments

Comments

@Salary-only-17k
Copy link

我的是'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
Copy link
Author

BrokenPipeError: [Errno 32] Broken pipe

@Salary-only-17k
Copy link
Author

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

@Aixining
Copy link

我的是'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
NVIDIA/flownet2-pytorch#113 (comment)

@Salary-only-17k
Copy link
Author

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

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

2 participants