Skip to content

深度学习笔记 | FSJZ #20

Description

@FSJZ2020

https://fsjz2020.github.io/2023/05/10/%E6%B7%B1%E5%BA%A6%E5%AD%A6%E4%B9%A0%E7%AC%94%E8%AE%B0/#more

数据操作原地操作使用x[:]=x+y或x+=y来进行原地操作。 1234567x=torch.randn((3,4))y=torch.arange(12).reshape((3,4))before=id(x)x[:]=x+yid(x)==before-------------------------------True

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions