original_docstring:  Load all data of the neural model.
  
          This method is used in the deserialization and copying of object.
  
          :param new_params: dictionary with names and new values of all parameters, specified in the constructor and
          received as result of training.
  
          :return: self.
          
docstring: Load all data of the neural model.
  This method is used in the deserialization and copying of object.
docstring_tokens: Load all data of the neural model . This method is used in the deserialization and copying of object .
code: def load_all(self, new_params):
          """ Load all data of the neural model.
  
          This method is used in the deserialization and copying of object.
  
          :param new_params: dictionary with names and new values of all parameters, specified in the constructor and
          received as result of training.
  
          :return: self.
          """
          if not isinstance(new_params, dict):
              raise ValueError(f'`new_params` is wrong! Expected {type({0: 1})}.')
          self.check_params(**new_params)
          expected_param_keys = {'batch_size', 'epochs', 'latent_dim', 'validation_split', 'lr', 'weight_decay',
                                 'lowercase', 'verbose', 'grad_clipping', 'random_state'}
          params_after_training = {'weights', 'input_token_index_', 'target_token_index_', 'reverse_target_char_index_',
                                   'max_encoder_seq_length_', 'max_decoder_seq_length_'}
          is_fitted = len(set(new_params.keys())) > len(expected_param_keys)
          if is_fitted:
              if set(new_params.keys()) != (expected_param_keys | params_after_training):
                  raise ValueError('`new_params` does not contain all expected keys!')
          self.batch_size = new_params['batch_size']
          self.epochs = new_params['epochs']
          self.latent_dim = new_params['latent_dim']
          self.validation_split = new_params['validation_split']
          self.lr = new_params['lr']
          self.weight_decay = new_params['weight_decay']
          self.lowercase = new_params['lowercase']
          self.verbose = new_params['verbose']
          self.grad_clipping = new_params['grad_clipping']
          self.random_state = new_params['random_state']
          if is_fitted:
              if not isinstance(new_params['input_token_index_'], dict):
                  raise ValueError(f'`new_params` is wrong! `input_token_index_` must be the `{type({1: "a", 2: "b"})}`!')
              if not isinstance(new_params['target_token_index_'], dict):
                  raise ValueError(f'`new_params` is wrong! `target_token_index_` must be the `{type({1: "a", 2: "b"})}`!')
              if not isinstance(new_params['reverse_target_char_index_'], dict):
                  raise ValueError(f'`new_params` is wrong! `reverse_target_char_index_` must be the `{type({1: "a", 2: "b"})}`!')
              if not isinstance(new_params['max_encoder_seq_length_'], int):
                  raise ValueError(f'`new_params` is wrong! `max_encoder_seq_length_` must be the `{type(10)}`!')
              if new_params['max_encoder_seq_length_'] < 1:
                  raise ValueError('`new_params` is wrong! `max_encoder_seq_length_` must be a positive integer number!')
              if not isinstance(new_params['max_decoder_seq_length_'], int):
                  raise ValueError(f'`new_params` is wrong! `max_decoder_seq_length_` must be the `{type(10)}`!')
              if new_params['max_decoder_seq_length_'] < 1:
                  raise ValueError('`new_params` is wrong! `max_decoder_seq_length_` must be a positive integer number!')
              self.max_decoder_seq_length_ = new_params['max_decoder_seq_length_']
              self.max_encoder_seq_length_ = new_params['max_encoder_seq_length_']
              self.input_token_index_ = copy.deepcopy(new_params['input_token_index_'])
              self.target_token_index_ = copy.deepcopy(new_params['target_token_index_'])
              self.reverse_target_char_index_ = copy.deepcopy(new_params['reverse_target_char_index_'])
              self.load_weights(new_params['weights'])
          return self
code_tokens: def load_all ( self , new_params ) : if not isinstance ( new_params , dict ) : raise ValueError ( f'`new_params` is wrong! Expected {type({0: 1})}.' ) self . check_params ( ** new_params ) expected_param_keys = { 'batch_size' , 'epochs' , 'latent_dim' , 'validation_split' , 'lr' , 'weight_decay' , 'lowercase' , 'verbose' , 'grad_clipping' , 'random_state' } params_after_training = { 'weights' , 'input_token_index_' , 'target_token_index_' , 'reverse_target_char_index_' , 'max_encoder_seq_length_' , 'max_decoder_seq_length_' } is_fitted = len ( set ( new_params . keys ( ) ) ) > len ( expected_param_keys ) if is_fitted : if set ( new_params . keys ( ) ) != ( expected_param_keys | params_after_training ) : raise ValueError ( '`new_params` does not contain all expected keys!' ) self . batch_size = new_params [ 'batch_size' ] self . epochs = new_params [ 'epochs' ] self . latent_dim = new_params [ 'latent_dim' ] self . validation_split = new_params [ 'validation_split' ] self . lr = new_params [ 'lr' ] self . weight_decay = new_params [ 'weight_decay' ] self . lowercase = new_params [ 'lowercase' ] self . verbose = new_params [ 'verbose' ] self . grad_clipping = new_params [ 'grad_clipping' ] self . random_state = new_params [ 'random_state' ] if is_fitted : if not isinstance ( new_params [ 'input_token_index_' ] , dict ) : raise ValueError ( f'`new_params` is wrong! `input_token_index_` must be the `{type({1: "a", 2: "b"})}`!' ) if not isinstance ( new_params [ 'target_token_index_' ] , dict ) : raise ValueError ( f'`new_params` is wrong! `target_token_index_` must be the `{type({1: "a", 2: "b"})}`!' ) if not isinstance ( new_params [ 'reverse_target_char_index_' ] , dict ) : raise ValueError ( f'`new_params` is wrong! `reverse_target_char_index_` must be the `{type({1: "a", 2: "b"})}`!' ) if not isinstance ( new_params [ 'max_encoder_seq_length_' ] , int ) : raise ValueError ( f'`new_params` is wrong! `max_encoder_seq_length_` must be the `{type(10)}`!' ) if new_params [ 'max_encoder_seq_length_' ] < 1 : raise ValueError ( '`new_params` is wrong! `max_encoder_seq_length_` must be a positive integer number!' ) if not isinstance ( new_params [ 'max_decoder_seq_length_' ] , int ) : raise ValueError ( f'`new_params` is wrong! `max_decoder_seq_length_` must be the `{type(10)}`!' ) if new_params [ 'max_decoder_seq_length_' ] < 1 : raise ValueError ( '`new_params` is wrong! `max_decoder_seq_length_` must be a positive integer number!' ) self . max_decoder_seq_length_ = new_params [ 'max_decoder_seq_length_' ] self . max_encoder_seq_length_ = new_params [ 'max_encoder_seq_length_' ] self . input_token_index_ = copy . deepcopy ( new_params [ 'input_token_index_' ] ) self . target_token_index_ = copy . deepcopy ( new_params [ 'target_token_index_' ] ) self . reverse_target_char_index_ = copy . deepcopy ( new_params [ 'reverse_target_char_index_' ] ) self . load_weights ( new_params [ 'weights' ] ) return self
short_docstring: Load all data of the neural model.
short_docstring_tokens: Load all data of the neural model .
comment: """ Load all data of the neural model.
  
          This method is used in the deserialization and copying of object.
  
          :param new_params: dictionary with names and new values of all parameters, specified in the constructor and
          received as result of training.
  
          :return: self.
          """