class_docstr: Keras classifier has the following attributes:
  
  Attributes:
      _model: the compiled keras classifier
      _input:  input placeholder of the model
      _output: output placeholder of the model
      _nb_classes:  number of outputs (e.g. binary classifier has 1 output)
      _input_shape: shape of 1 input sample
docstr: Initialize KerasClassifier.
  
  Args:
      model: a trained keras classifier model.
docstr_tok: ["Initialize","KerasClassifier",".","Args",":","model",":","a","trained","keras","classifier","model","."]
code: def __init__(self, model, input_layer=0, output_layer=0):
      """Initialize KerasClassifier.
  
      Args:
          model: a trained keras classifier model.
      """
  
      import keras.backend as k
  
      super(KerasClassifier, self).__init__()
  
      self._model = model
  
      if hasattr(model, "inputs"):
          self._input = model.inputs[input_layer]
      else:
          self._input = model.input
  
      if hasattr(model, "outputs"):
          self._output = model.outputs[output_layer]
      else:
          self._output = model.output
  
      _, self._nb_classes = k.int_shape(self._output)
      self._input_shape = k.int_shape(self._input)[1:]
  
imports: import abc
  import sys
  import numpy
  import torch
label_desc: Use image node_id 1 to create a new KerasClassifier object from inherited base classes: BaseClassifier with example: obj = KerasClassifier(model, input_layer, output_layer)