Hi Mattia,
Since you haven’t shown correct_train & accuracy_train, thus it is hard to say!
First thing you should do is to print targets & prediction output. I think your targets are integer while your predictions are probabilities.
Please make sure you are matching “(predicted_eval == targets_eval)” on similar scale/type/probability thresholds!
Make sure they are of same type (e.g. float32), if they are predicted probabilities then convert them to binary levels as same as targets.

E.g. if your target classes are 0.0 & 1.0
predicted = torch.from_numpy(np.where(output_eval >=0.0, 1.0, 0.0)).to(device)

ignore to(device) if you are not using GPU

correct_eval += predicted.eq(targets_eval).sum().item()

Hope this help!