import torch
import torch.nn as nn
import torchvision
import numpy as np
import randomimport torch
import torchvision
m=torchvision.models.alexnet(pretrained=True)
print(m)
class AlexNet(nn.Module):def __init__(self):super(AlexNet,self).__init__()# 第一层 self.conv1=nn.Conv2d(3,96,7,2,2) # 卷积层 self.relu1=nn.ReLU(inplace=True) # 激活函数层 self.MaxPool2d1=nn.MaxPool2d(3,2,0)# 池化层# 第二层 self.conv2=nn.Conv2d(96,256,5,1,2)self.relu2=nn.ReLU(inplace=True)self.MaxPool2d2=nn.MaxPool2d(3,2,0) # 第三层 self.conv3=nn.Conv2d(256,384,3,1,1)self.relu3=nn.ReLU(inplace