摘要:
pytorch 的 reshape((-1, 1)) 是什么意思 代码 import torch print(torch.tensor([1,2,3,4,5,6,7,8]).reshape(-1,1)) tensor([[1], [2], [3], [4], [5], [6], [7], [8]]) 阅读全文
posted @ 2025-12-30 10:31
fanbal
阅读(5)
评论(0)
推荐(0)
摘要:
pytorch 中 argmax(1) 是什么意思? 示例 import torch print(torch.tensor([[1,2,3,4,5],[100,3,4,5,6]]).argmax(1)) tensor([4, 0]) 解释 阅读全文
posted @ 2025-12-30 09:43
fanbal
阅读(4)
评论(0)
推荐(0)
摘要:
pytorch 识别 MNIST 数据集实现数字识别 零、导入数据集 结构如下: import torch import torchvision from torch.utils.data import DataLoader # 都是在0~1的喵 train_data = torchvision.d 阅读全文
posted @ 2025-12-30 09:27
fanbal
阅读(6)
评论(0)
推荐(0)

浙公网安备 33010602011771号