hi Tahir,
I get the warning after the loss function below:
for epoch in range(num_epochs):
    for data, target in train_loader:
        print("data=",data.shape)# this gives the size as [16,2048]
        data = data.cuda()
        z_loc, z_scale = model.Encoder(data)
        z = model.reparam(z_loc, z_scale)
        out = model.Decoder(z)
        loss = loss_fn(out, data, z_loc, z_scale)
        optimizer.zero_grad()

Which is after I have used the unsqueeze here:
    def forward(self, data):
        data=data.unsqueeze(1)
       print("data_mod=",data.shape) # this reshapes to [16,1,2048]