def load_model_parameters(path, map_location='cpu'):
    state_dict = torch.load(path, map_location=map_location)
    if ('model' in state_dict):
        return state_dict['model']
    return state_dict
def load_model_parameters(path, map_location='cpu'):
    state_dict = torch.load(path, map_location=map_location)
    if ('model' in state_dict):
        return state_dict['model']
    return state_dict