
pytorch
踏实写代码,认真搞学术的小研
世界很大,我们很小,让我们一起码出世界!加油吧,各位!
展开
-
pytorch中gather函数
一般没遇到太好的讲解是不会写博客的 https://www.bilibili.com/video/BV1Ly4y1n7dN?spm_id_from=333.337.search-card.all.click添加链接描述原创 2022-04-05 17:17:53 · 196 阅读 · 0 评论 -
torch.max(output, 2, keepdim=True)[1]
1、torch.max() torch.max(input) → Tensor 返回 input tensor 中所有元素的最大值。 torch.max(input, dim, keepdim=False) → output tensors (max, max_indices) 参数: input:输入的 tensor。 dim:按什么维度求最大值(2D中,0代表按列求最大值,1代表按行求最大值)。 keepdim:是否保持 input tensor 的维度,True 代表 out tensor 与 in原创 2022-03-11 21:05:21 · 2290 阅读 · 1 评论