Hi @ptrblck …
I finally found de answer. When I create my training dataloader with shuffle=True, there is no harm in fitting the model.
The problem came after, when using the same shuffled training dataloader for predictions which caused a disaster since the orders were altered, so those predictions were no longer ordered as the y_train expected. In a nutshell, the samples were unordered …
I created a second dalaloder, thsi way:
train_dl = DataLoader(train_ds, batch_size=1000, shuffle=True)

train_dl_for_prediction = DataLoader(train_ds, batch_size=1000, shuffle=False)
test_dl = DataLoader(test_ds, batch_size=1000, shuffle=False)

then … I fitted the model…
losses = model.fit(train_dl=train_dl, epochs=epochs, loss_fn=bceloss_fn, opt=optimizer)
But when calling to predict, I did it this way
image1568×894 120 KB
I don’t know if there is a cleaner way to do this, that is, using the original training dataloader, but unshuffled …
Thanks for helping me …
Best regards