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

这种view变换形状的时候报错?求解 #27

Open
wuxiaohui0 opened this issue Sep 18, 2024 · 1 comment
Open

这种view变换形状的时候报错?求解 #27

wuxiaohui0 opened this issue Sep 18, 2024 · 1 comment

Comments

@wuxiaohui0
Copy link

image

@wuxiaohui0
Copy link
Author

已解决!原因是view()操作需要输入张量的元素地址连续。解决方案是在.view()前添加.contiguous(),确保张量连续,从而解决问题。

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

1 participant