摘要: from __future__ import print_function, division import torch import torch.nn as nn import torch.optim as optim from torch.optim import lr_scheduler im 阅读全文
posted @ 2020-08-22 18:41 eo_will 阅读(493) 评论(0) 推荐(0) 编辑
摘要: ##训练分类器 import torch import torchvision import torchvision.transforms as transforms import torch.nn as nn import torch.nn.functional as F #1- 加载和预处理数据 阅读全文
posted @ 2020-08-22 18:39 eo_will 阅读(480) 评论(0) 推荐(0) 编辑
摘要: from __future__ import print_function import torch ##1 基本操作 #构建tensor x = torch.empty(5, 3) x = torch.rand(5, 3) x = torch.zero(5, 3, dtype=torch.long 阅读全文
posted @ 2020-08-22 18:37 eo_will 阅读(338) 评论(0) 推荐(1) 编辑