class_docstr: Wrapper class for importing Keras models.
docstr: Perform prediction for a batch of inputs.
  
  :param x: Input samples.
  :param batch_size: Size of batches.
  :param training_mode: `True` for model set to training mode and `'False` for model set to evaluation mode.
  :return: Array of predictions of shape `(nb_inputs, nb_classes)`.
docstr_tok: ["Perform","prediction","for","a","batch","of","inputs",".",":","param","x",":","Input","samples",".",":","param","batch_size",":","Size","of","batches",".",":","param","training_mode",":","`","True","`","for","model","set","to","training","mode","and","`","'False","`","for","model","set","to","evaluation","mode",".",":","return",":","Array","of","predictions","of","shape","`","(","nb_inputs",",","nb_classes",")","`","."]
code: def predict(  # pylint: disable=W0221
      self,
      x: np.ndarray,
      batch_size: int = 128,
      training_mode: bool = False,
      **kwargs,
  ) -> np.ndarray:
      """
      Perform prediction for a batch of inputs.
  
      :param x: Input samples.
      :param batch_size: Size of batches.
      :param training_mode: `True` for model set to training mode and `'False` for model set to evaluation mode.
      :return: Array of predictions of shape `(nb_inputs, nb_classes)`.
      """
      # Apply preprocessing
      x_preprocessed, _ = self._apply_preprocessing(
          x, y=None, fit=False
      )
  
      # Run predictions with batching
      if training_mode:
          predictions = self._model(
              x_preprocessed, training=training_mode
          )
      else:
          predictions = self._model.predict(
              x_preprocessed, batch_size=batch_size
          )
  
      # Apply postprocessing
      predictions = self._apply_postprocessing(
          preds=predictions, fit=False
      )
  
      return predictions
  
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 10 for calling the KerasClassifier obj's underlying member method code with example usage: obj.predict(x, batch_size, training_mode) and returns: predictions