Hi @ptrblck , thank you for you awnser!
Before I tried to add this middle layer, the autoencoder was working  only with the Conv1d and ConvTranspose1d. But since I need this middle one with a small size for my project,  I was told by a friend that I should add a Linear layer.
After reading your awnser, I’m not sure whether this is a good approach or if I’m just being stupid 
Do you know, if there is a way to pass the Linear layer output as an input for the Transpose1D?