Without knowing how the data looks like, and comments about the shapes of the tensors when the flow to the network, it’s very difficult to follow your code. The many squeeze() and unsqueeze() operations seem alright, but again, it’s hard to follow.
However, the line output = F.relu(input) in your decoder struck me as odd. ReLU is an activation function taking the output of a layer as input, and not the raw data input. If your inputs can be negative values, they are all cut to 0.