Pytorch handbook

Pytorch 中文文档
https://pytorch-cn.readthedocs.io/zh/latest/package_references/torch/

Pytorch Tutorial 英文原版
https://pytorch.org/tutorials/index.html

Pytorch Tutorial 中文版
PyTorch 1.2 中文文档 & 教程
https://pytorch.apachecn.org/docs/1.2/


PyTorch教程中文版
http://www.pytorch123.com/


Pytorch学习笔记(二)——Tensor https://www.cnblogs.com/cieusy/p/10565726.html

一、对Tensor的操作 从接口的角度讲,对Tensor的操作可以分为两类:

(1)torch.function (2)tensor.function

比如torch.sum(a, b)实际上和a.sum(b)功能等价。

从存储的角度讲,对Tensor的操作也可以分为两类:

(1)不修改自身数据,如a.add(b),加法结果返回一个新的tensor;

(2)修改自身数据,如a.add_(b),加法结果仍存在a中,a被改变。

函数名以_结尾的称为inplace方式。

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章