halikuralde15:

I got an error which target size (torch.Size([32])) that is different to the input size (torch.Size([32768]))


You need to add error output, otherwise people have to browse through the code in details. Anyway, it means that some layer expects Tensor with size 32768 as an input but gets only Tensor size 32.