docstr: Calculate the prediction of the data.
  Args:
      data(numpy.ndarray): input data with shape (size,
      height, width, channels).
  Return:
      numpy.ndarray: predictions of the data with shape (batch_size,
          num_of_classes).
docstr_tok: ["Calculate","the","prediction","of","the","data",".","Args",":","data","(","numpy.ndarray",")",":","input","data","with","shape","(","size",",","height",",","width",",","channels",")",".","Return",":","numpy.ndarray",":","predictions","of","the","data","with","shape","(","batch_size",",","num_of_classes",")","."]
code: def predict(self, data):
      """
      Calculate the prediction of the data.
      Args:
          data(numpy.ndarray): input data with shape (size,
          height, width, channels).
      Return:
          numpy.ndarray: predictions of the data with shape (batch_size,
              num_of_classes).
      """
  
      import keras.backend as k
  
      k.set_learning_phase(0)
  
      if self._featurefqueezing_bit_depth is not None:
          # logging.info(data)
          scaled_data = FeatureFqueezingDefence(
              data.copy(),
              None,
              self._featurefqueezing_bit_depth,
              self._bounds,
          )
          # logging.info(scaled_data)
  
      scaled_data = self._process_input(scaled_data)
  
      # logging.info(scaled_data)
  
      # Run prediction
      predict = self._preds(inputs=[scaled_data])
      predict = np.squeeze(predict, axis=0)
  
      # print(predict)
      # print(np.argmax(predict))
  
      return predict
  
file_path: AdvBox/adversarialbox/models/keras.py
imports: from __future__ import absolute_import
  from builtins import str
  import numpy
  import os
  import sys
  from .base import Model
  from adversarialbox.defences.feature_squeezing import FeatureFqueezingDefence
  import logging
label_desc: Use image node_id 2 for calling the KerasModel obj's underlying member method code with example usage: obj.predict(data) and returns: predict