Since you are using only one output neuron in your model, you shouldn’t use torch.max(output, 1) to get the prediction.
Instead try to use a threshold to get your predictions, e.g.:
thresh = 0.5
preds = output > thresh