class Model(nn.Module):
    def __init__(self)
        super(Model, self).__init__()
        self.layer = resnext50_32x4d(pretrained = False)
        self.layer.fc = nn.Linear(2048,100)
        self.query = nn.Linear(100,100, bias = False)
        self.key = nn.Linear(100,100, bias = False)
        self.value = nn.Linear(100,100, bias = False)
        self.nl = nn.LogSoftmax(dim = 1)

    def forward(self, X):
        x = self.layer(X)
        q = self.query(x)
        k = self.key(x)
        v = self.value(x)
        kqdots = torch.matmul(q, torch.transpose(k, 0, 1))
        return kqdots

This is the Model I am using. The batch size is 64.
I get the predictions using
model = Model()
model = torch.nn.DataParallel(model).cuda()
pred = model(data)

Shape of input  batch is
torch.Size(64,3,256,256)

However the shape of the output I am getting is
torch.Size(200, 32)

Shouldn’t it be
torch.Size(64, 64)

I am using Pytorch version 1.1.0