class_docstr: Wrapper class for importing Keras models.
docstr: Fit the classifier on the training set `(x, y)`.
  
  :param x: Training data.
  :param y: Target values (class labels) one-hot-encoded of shape (nb_samples, nb_classes) or index labels of
            shape (nb_samples,).
  :param batch_size: Size of batches.
  :param nb_epochs: Number of epochs to use for training.
  :param verbose: Display training progress bar.
  :param kwargs: Dictionary of framework-specific arguments. These should be parameters supported by the
         `fit_generator` function in Keras and will be passed to this function as such. Including the number of
         epochs or the number of steps per epoch as part of this argument will result in as error.
docstr_tok: ["Fit","the","classifier","on","the","training","set","`","(","x",",","y",")","`",".",":","param","x",":","Training","data",".",":","param","y",":","Target","values","(","class","labels",")","one-hot-encoded","of","shape","(","nb_samples",",","nb_classes",")","or","index","labels","of","shape","(","nb_samples",",",")",".",":","param","batch_size",":","Size","of","batches",".",":","param","nb_epochs",":","Number","of","epochs","to","use","for","training",".",":","param","verbose",":","Display","training","progress","bar",".",":","param","kwargs",":","Dictionary","of","framework-specific","arguments",".","These","should","be","parameters","supported","by","the","`","fit_generator","`","function","in","Keras","and","will","be","passed","to","this","function","as","such",".","Including","the","number","of","epochs","or","the","number","of","steps","per","epoch","as","part","of","this","argument","will","result","in","as","error","."]
code: def fit(  # pylint: disable=W0221
      self,
      x: np.ndarray,
      y: np.ndarray,
      batch_size: int = 128,
      nb_epochs: int = 20,
      verbose: bool = False,
      **kwargs,
  ) -> None:
      """
      Fit the classifier on the training set `(x, y)`.
  
      :param x: Training data.
      :param y: Target values (class labels) one-hot-encoded of shape (nb_samples, nb_classes) or index labels of
                shape (nb_samples,).
      :param batch_size: Size of batches.
      :param nb_epochs: Number of epochs to use for training.
      :param verbose: Display training progress bar.
      :param kwargs: Dictionary of framework-specific arguments. These should be parameters supported by the
             `fit_generator` function in Keras and will be passed to this function as such. Including the number of
             epochs or the number of steps per epoch as part of this argument will result in as error.
      """
      y_ndim = y.ndim
      y = check_and_transform_label_format(
          y, nb_classes=self.nb_classes
      )
  
      # Apply preprocessing
      x_preprocessed, y_preprocessed = self._apply_preprocessing(
          x, y, fit=True
      )
  
      # Adjust the shape of y for loss functions that do not take labels in one-hot encoding
      if self._reduce_labels or y_ndim == 1:
          y_preprocessed = np.argmax(y_preprocessed, axis=1)
  
      self._model.fit(
          x=x_preprocessed,
          y=y_preprocessed,
          batch_size=batch_size,
          epochs=nb_epochs,
          verbose=int(verbose),
          **kwargs,
      )
  
imports: from __future__ import absolute_import, division, print_function, unicode_literals
  import logging
  import os
  import time
  from typing import Any, Callable, Dict, Iterator, List, Optional, Tuple, Union, TYPE_CHECKING
  import numpy
  import six
  from art import config
  from art.estimators.keras import KerasEstimator
  from art.estimators.classification.classifier import ClassifierMixin, ClassGradientsMixin
  from art.utils import check_and_transform_label_format
label_desc: Use image node_id 11 for calling the KerasClassifier obj's underlying member method code with example usage: obj.fit(x, y, batch_size, nb_epochs, verbose) without return types