一个python文件中的两个linear()层和一个conv2d()层同时使用(b,c,1,1)大小的张量作为输入时的输出结果对比
importtorchimporttorch.nnasnnx=torch.randn(6,512,1,1)print(x,x.shape)##x_=torch.randn(64,5)x_=x.view(6,512)m_=nn.Linear(512,5)m__=nn.Linear(512,5)y_=m_(x_)y__=m__(x_)print(m_.weight,m_.weight.shape)pr