Problem when reload a saved learner and attach it to the same dataloader


I meet this problem when i have trained a model and i saved it.

After that i reloaded the model,


i predicted 10 items, and it gave me 7 right answers.

And then i wanted to attach the same dataloader as when i trained the model. I just redo the dataloader with the same code. That is exactly the same code, the same source as when i trained the model.

dblock = DataBlock(blocks = (SelfBlock, CategoryBlock),
get_items = get_img_files,
get_y = y_get,
splitter =IndexSplitter(index),
item_tfms = None,
batch_tfms = Dihedral)

dls = dblock.dataloaders(source,
bs = 15)


where the SelfBlock, get_img_files, y_get and index are the custom functions that i gave.

Just after that i do this (attach the dataloader to the trained learner), i retry the same 10 items, and it gave me 10 wrong answers. I don’t know what i haved changed after attaching the dataloader but it seems that the parametres in the model has totally changed!

I’m very confused and thank you very much if you can help me save the problem.