I tested this code
class Net(nn.Module):
def __init__(self):
super(Net,self).__init__()
self.features1 = nn.Sequential(
nn.Conv2d(1, 6, 3, 1, 1),
nn.ReLU(),
nn.MaxPool2d(2),
nn.Conv2d(6,6, 3, 1, 1),
nn.ReLU(),
nn.MaxPool2d(2)
)
self.fc_out = nn.Linear((6), 2)
def forward(self, x1):
x1 = self.features1(x1)
x1 = x1.view(x1.size(0), -1)
x1 = F.relu(self.fc_out(x1))
x1 = self.fc_out(x1)
return x1
but this problem is displayed
RuntimeError: mat1 and mat2 shapes cannot be multiplied (6451x6 and 32x2)
help me plzzz