2021年10月23日
摘要: 使用VGG模型进行猫狗大战 import numpy as np import matplotlib.pyplot as plt import os import torch import torch.nn as nn import torchvision from torchvision impo 阅读全文
posted @ 2021-10-23 19:11 东皇御前 阅读(33) 评论(0) 推荐(0) 编辑
  2021年10月16日
摘要: 一、MNIST 数据集分类 1.加载数据 import torch import torch.nn as nn import torch.nn.functional as F import torch.optim as optim from torchvision import datasets, 阅读全文
posted @ 2021-10-16 16:24 东皇御前 阅读(99) 评论(0) 推荐(0) 编辑
  2021年10月8日
摘要: pytorch练习 使用torch.Tensor定义数据 , tensor的意思是张量,是数字各种形式的总称,可以定义数、向量、二维数组和张量。 import torch # 可以是一个数 x = torch.tensor(666) print(x) # 可以是一维数组(向量) x = torch. 阅读全文
posted @ 2021-10-08 15:53 东皇御前 阅读(109) 评论(0) 推荐(0) 编辑