pytorch tensor的基本函式

codeDRT發表於2020-12-05

交換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

相關文章