Hey! Thanks for you reply.
This code snipped is just iterating over just one batch. My goal here is just to make sure everything is working correctly. But as I said, the model is not overfitting, it’s just predicting just one class.
When I run with the entire dataset, the same happens: the model learns to guess, for example, 1 for all the examples.