Load Learner - AttributeError: Can't get attribute 'FlattenedLoss' on <module 'fastai.layers'

AttributeError: ‘wrapper_descriptor’ object has no attribute ‘code

I get this error while loading the model in another notebook. please explain my mistake and a solution. thanks