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

fix: torch.tensor创建的torch张量与原numpy数组是不共享内存的 #1342

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

surpoloyang
Copy link

preliminary的ndarray中转换为Python其他对象的pytorch部分,torch.tensor创建的torch张量与原numpy数组不共享内存而torch.from_numpy创建的torch张量与原numpy数组才是共享内存的。

…,while tensors created by torch.from_numpy share memory with ndarrays.
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

Successfully merging this pull request may close these issues.

1 participant