pytorch tensor的基本函数

交换tensor维度:torch.Tensor.permute (Python method, in torch.Tensor)
https://zhuanlan.zhihu.com/p/76583143
https://blog.csdn.net/york1996/article/details/81876886

tensor初始化(均匀分布、正态分布。。。):torch.nn.init
https://blog.csdn.net/dss_dssssd/article/details/83959474

tensor转化为模型可训练的parameter:torch.nn.Parameter()
https://www.jianshu.com/p/d8b77cc02410

tensor乘法:torch.matual()
https://blog.csdn.net/qsmx666/article/details/105783610

tensor拼接 torch.cat()、扩维 torch.Tensor.expand()、压缩 torch.squeeze()、重复torch.Tensor.repeat()、变形 torch.Tensor.view()、改变尺寸 torch.Tensor.resize_():
https://www.cnblogs.com/jiangkejie/p/10683531.html

tensor转置:torch.Tensor.t()
https://blog.csdn.net/choupeng8596/article/details/100809964

tensor某一维求和:torch.sum()
https://blog.csdn.net/qq_39463274/article/details/105145029

你可能感兴趣的:(pytorch)