code: def set_generator_validation_nb(self, number):
          
  
          self.nb_val_samples = number
          diff_to_batch = number % self.get_batch_size()
          if diff_to_batch > 0:
              self.nb_val_samples += self.get_batch_size() - diff_to_batch
  
          import keras
          if '1' != keras.__version__[0]:
              self.nb_val_samples = self.nb_val_samples // self.get_batch_size()
docs: sets self.nb_val_samples which is used in model.fit if input is a generator
          :param number:
          :return: