class_docstr: ```
  Abstract class used to tune and train Keras models. The fit method is
  an abstract method and must be implemented by subclasses.
  ```
class_docstr_tok: ["``","`","Abstract","class","used","to","tune","and","train","Keras","models",".","The","fit","method","is","an","abstract","method","and","must","be","implemented","by","subclasses",".","``","`"]
code: def __init__(self, model, workers=1, use_multiprocessing=False):
      if not isinstance(model, keras.Model):
          raise ValueError("model must be of instance keras.Model")
      self.model = model
      self.lr_finder = LRFinder(self.model)
      self.workers = workers
      self.use_multiprocessing = use_multiprocessing
      self.history = None
  
      # save original weights of model
      try:
          new_file, weightfile = tempfile.mkstemp()
          self.model.save_weights(weightfile)
          self._original_weights = weightfile
      except Exception as e:
          warnings.warn(
              "Could not save original model weights: %s" % (e)
          )
          self._original_weights = None
  
imports: from .None import utils
  from .graph.predictor import LinkPredictor, NodePredictor
  from .graph.preprocessor import LinkPreprocessor, NodePreprocessor
  from .imports import *
  from .lroptimize.lrfinder import *
  from .tabular.predictor import TabularPredictor
  from .tabular.preprocessor import TabularPreprocessor
  from .text.ner.predictor import NERPredictor
  from .text.ner.preprocessor import NERPreprocessor
  from .text.predictor import TextPredictor
  from .text.preprocessor import BERTPreprocessor, TextPreprocessor, TransformersPreprocessor
  from .vision.predictor import ImagePredictor
  from .vision.preprocessor import ImagePreprocessor
label_desc: Use image node_id 1 to create a new Learner object from inherited base classes: ABC with example: obj = Learner(model, workers, use_multiprocessing)