Hey, I’m just a programming enthusiast, but, from what I know, **kwargs usually is an optional argument passed in a dictionary form(the **dictionary is a short way of saying “for each A key in dictionary, use its values”). For example, you can use function(args, dict(learning_rate=3)). Usually, you won’t be using **kwargs that much and your code will still be fine with default parameters.
Args is the arguments which are mandatory for that function.
Example: In the torch.save documentation, you can see that the function is torch.save(obj , f , pickle_module=pickle , pickle_protocol=DEFAULT_PROTOCOL , _use_new_zipfile_serialization=True). The args, in this case, are the object and f, which you MUST pass into the function. The other arguments are optional.
You probably need to check the code used to load the model in your class MidasNet, so you can see how it works and which args are mandatory.
From what I see in both torch.save and torch.load functions docs and from my experience, the settings are already included in your state_dict(which is a dictionary with parameters and weights for your model, saved when you use torch.save())