class_docstr: Abstract base class of all MatchZoo models.
  
  MatchZoo models are wrapped over keras models, and the actual keras model
  built can be accessed by `model.backend`. `params` is a set of model
  hyper-parameters that deterministically builds a model. In other words,
  `params['model_class'](params=params)` of the same `params` always create
  models with the same structure.
  
  :param params: Model hyper-parameters. (default: return value from
      :meth:`get_default_params`)
  :param backend: A keras model as the model backend. Usually not passed as
      an argument.
  
  Example:
      >>> BaseModel()  # doctest: +ELLIPSIS
      Traceback (most recent call last):
      ...
      TypeError: Can't instantiate abstract class BaseModel ...
      >>> class MyModel(BaseModel):
      ...     def build(self):
      ...         pass
      >>> isinstance(MyModel(), BaseModel)
      True
class_docstr_tok: ["Abstract","base","class","of","all","MatchZoo","models",".","MatchZoo","models","are","wrapped","over","keras","models",",","and","the","actual","keras","model","built","can","be","accessed","by","`","model.backend","`",".","`","params","`","is","a","set","of","model","hyper-parameters","that","deterministically","builds","a","model",".","In","other","words",",","`","params","[","'model_class","'","]","(","params=params",")","`","of","the","same","`","params","`","always","create","models","with","the","same","structure",".",":","param","params",":","Model","hyper-parameters",".","(","default",":","return","value","from",":","meth",":","`","get_default_params","`",")",":","param","backend",":","A","keras","model","as","the","model","backend",".","Usually","not","passed","as","an","argument",".","Example",":",">",">",">","BaseModel","(",")","#","doctest",":","+ELLIPSIS","Traceback","(","most","recent","call","last",")",":","...","TypeError",":","Ca","n't","instantiate","abstract","class","BaseModel","...",">",">",">","class","MyModel","(","BaseModel",")",":","...","def","build","(","self",")",":","...","pass",">",">",">","isinstance","(","MyModel","(",")",",","BaseModel",")","True"]
docstr: Fit the model.
  
  See :meth:`keras.models.Model.fit` for more details.
  
  :param x: input data.
  :param y: labels.
  :param batch_size: number of samples per gradient update.
  :param epochs: number of epochs to train the model.
  :param verbose: 0, 1, or 2. Verbosity mode. 0 = silent, 1 = verbose,
      2 = one log line per epoch.
  
  Key word arguments not listed above will be propagated to keras's fit.
  
  :return: A `keras.callbacks.History` instance. Its history attribute
      contains all information collected during training.
code: def fit(
      self,
      x: typing.Union[np.ndarray, typing.List[np.ndarray], dict],
      y: np.ndarray,
      batch_size: int = 128,
      epochs: int = 1,
      verbose: int = 1,
      **kwargs,
  ) -> keras.callbacks.History:
      """
      Fit the model.
  
      See :meth:`keras.models.Model.fit` for more details.
  
      :param x: input data.
      :param y: labels.
      :param batch_size: number of samples per gradient update.
      :param epochs: number of epochs to train the model.
      :param verbose: 0, 1, or 2. Verbosity mode. 0 = silent, 1 = verbose,
          2 = one log line per epoch.
  
      Key word arguments not listed above will be propagated to keras's fit.
  
      :return: A `keras.callbacks.History` instance. Its history attribute
          contains all information collected during training.
      """
      return self._backend.fit(
          x=x,
          y=y,
          batch_size=batch_size,
          epochs=epochs,
          verbose=verbose,
          **kwargs,
      )
  
imports: import abc
  import typing
  from pathlib import Path
  import dill
  import numpy
  import keras
  import keras.backend
  import pandas
  import matchzoo
  from matchzoo import DataGenerator
  from matchzoo.engine import hyper_spaces
  from matchzoo.engine.base_preprocessor import BasePreprocessor
  from matchzoo.engine.base_metric import BaseMetric
  from matchzoo.engine.param_table import ParamTable
  from matchzoo.engine.param import Param
  from matchzoo import tasks
label_desc: Use image node_id 9 for calling the BaseModel obj's underlying member method code with example usage: obj.fit(x, y, batch_size, epochs, verbose) and returns: self