astri:

(1934,1024)


I’m afraid your input is not the size you think 
import torch
from torch import nn



class MLP(nn.Module):
    def __init__(self):
        super(MLP, self).__init__()
        self.layers = nn.Sequential(
            nn.Linear(1024, 100),
            nn.Sigmoid(),
            nn.Linear(100, 8),
            # tempsigmoid()
        )

    def forward(self, x):
        x = self.layers(x)
        return x

a= torch.rand(32,1934,1024)

model = MLP()
out = model(a)
print(out.shape)

torch.Size([32,1934, 8])

Btw I didn’t use TempSigmoid as temp variable is not defined