I have saved the model using this code:
torch.save(best_model.state_dict(),'./leaf_Classsification_GPU_CutMix_EfficientNet-B4.pt')
then when I tried to load the model using this:
model = Net()
model.load_state_dict(torch.load("leaf_Classsification_GPU_CutMix_EfficientNet-B4.pt"))
model.eval()

it is giving me error:
AttributeError: ‘_IncompatibleKeys’ object has no attribute ‘eval’
Please suggest.
THIS IS THE MODEL WHICH IS TO BE LOADED 2 for evaluation