Hi ptrblck,
brilliant you are a genius (I have been pulling my hair out all day over this one )…
Now I have:
AttributeError: ‘list’ object has no attribute ‘cuda’
    for epoch in range(num_epochs):
        for data in train_dataset:
            data = data.cuda()

This is really frustrating because this worked as a normal autoencoder, but the moment i converted it to a variational autoencoder it stopped working…