pytorch基础:autograd, 模型定义
import osfrom turtle import forwardimport cv2import torch# 定义一个网络import torch.nn as nnimport torch.nn.functional as Fclass Net(nn.Module): def __init__(self): # super相当于是指向当前对象的父类,这样就可以用super.xxx来引用父类的成员。 super(Net, self).__.







