Prateek Chhikara

Results 1 comments of Prateek Chhikara

You can replace the following code: ``` model_en.load_state_dict(torch.load('model_en.pkl')) model_de.load_state_dict(torch.load('model_de.pkl')) model_class.load_state_dict(torch.load('model_class.pkl')) ``` with: ``` def remove_module_prefix(state_dict): """ Removes the 'module.' prefix from each key in the state dictionary. This is useful...