This is the architecture I am using:
class SVM_Net(nn.Module):
    def __init__(self,n_feature,n_class):
        super(SVM_Net, self).__init__()
        self.fc=nn.Linear(n_feature,n_class)
        nn.init.kaiming_uniform(self.fc.weight)
        nn.init.constant(self.fc.bias,0.1)
        
    def forward(self,x):
        output = self.fc(x)
        return output

In the meantime I already found out that I can use padding in order to solve my problem.
I am using a custom collate_fn method, however is there a way to pad them to a fixed, predefined length?
def pad_collate(batch):
    xx = []
    for elt in batch:
        xx.append(elt['data'])
    
    xx_pad = torch.nn.utils.rnn.pad_sequence(xx, batch_first=True, padding_value=0)
    return xx_pad