parameters: (model_path: str, no_char_decoder=False)
return_statement: return model
docstring: Load the model from a file.
          @param model_path (str): path to model
docstring_summary: Load the model from a file.
docstring_tokens: Load the model from a file .
function: def load(model_path: str, no_char_decoder=False):
          """ Load the model from a file.
          @param model_path (str): path to model
          """
          params = torch.load(model_path, map_location=lambda storage, loc: storage)
          args = params['args']
          model = NMT(vocab=params['vocab'], no_char_decoder=no_char_decoder, **args)
          model.load_state_dict(params['state_dict'])
  
          return model
function_tokens: def load ( model_path : str , no_char_decoder = False ) : params = torch . load ( model_path , map_location = lambda storage , loc : storage ) args = params [ 'args' ] model = NMT ( vocab = params [ 'vocab' ] , no_char_decoder = no_char_decoder , * * args ) model . load_state_dict ( params [ 'state_dict' ] ) return model