#获取网络中的参数 #1、定义一个网络 import torch import torch.nn as nn class Net(nn.Module): def __init__(self): super().__init__() self.conv = nn.Conv2d(in_channels=3, out_channels=5, kernel_size=3) def forward(self,x): x = self.conv(x) return x #2、随机模拟获得一个图像数据, 按 NCHW 的顺序填入数字 img = torch.randn((1, 3, 5, 5)) #3、创建...