preds = torch.randn(32, 1) # model output print(preds.squeeze(-1).shape) # torch.Size([32])