Torch save without explicitly defining the model class

So I downloaded a trained model’s weights and loaded it using torch.load(). But I am unable to directly run inference on it since it says it is unable to reference the class of the model. Keep in mind I am not loading the state dict of the model but the whole model itself. Why do I still need to explicitly define the model class name? Just curious

I think this is a limitation of the Python pickle module e.g. as described here at the bottom of the page.