Unable to load the state dict model

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 for evaluation

Can you show me the complete code of your Net class?

Yes why not , here’s the link to my notebook .

and here’s my model class:

class EfficientNet_b4(nn.Module):
    def __init__(self):
        super(EfficientNet_b3, self).__init__()
        self.model = efficientnet_pytorch.EfficientNet.from_pretrained('efficientnet-b4')
        self.dropout = nn.Dropout(0.1)
        self.final_layer = nn.Linear(1792 , 5)
        
    def forward(self, inputs):
        batch_size, _, _, _ = inputs.shape
        
        x = self.model.extract_features(inputs)

        # Pooling and final linear layer
        x = self.model._avg_pooling(x)
        
        x = F.adaptive_avg_pool2d(x, 1).reshape(batch_size, -1)
        outputs = self.final_layer(self.dropout(x))

        return outputs
    
model = efficientnet_pytorch.EfficientNet.from_pretrained('efficientnet-b4')