That’s strange. Could you please also print data.shape before passing it into the model?
If your output (without the max operation) hast shape [1, 1, 128, 128], something seems to be wrong with your model. Could you post the model definition, if it’s possible?
BTW, probably unrelated, but you should call just the model with your input: model(data) instead of model.forward(data).