code: def __init__(
      self,
      session,
      input,
      label,
      logits,
      loss,
      bounds,
      channel_axis=3,
      preprocess=None,
  ):
      import tensorflow as tf
  
      if preprocess is None:
          preprocess = (0, 1)
  
      super(TensorflowModel, self).__init__(
          bounds=bounds,
          channel_axis=channel_axis,
          preprocess=preprocess,
      )
  
      self._session = session
  
      self._loss = loss
  
      self._label = label
      self._logits = logits
      self._input = input
      self._input_shape = tuple(self._input.get_shape()[1:])
      self._nb_classes = int(self._logits.get_shape()[-1])
  
      logger.info("self._input_shape:" + str(self._input_shape))
  
      logger.info("init grads[{0}]...".format(self._nb_classes))
  
      # self._grads= tf.gradients(self._loss, self._input)[0]
      # self._grads= tf.gradients(self._logits, self._input)[0]
      self._grads = [None for _ in range(self._nb_classes)]
  
      logger.info("Finish TensorflowPBModel init")
  
file_path: AdvBox/adversarialbox/models/tensorflow.py
imports: from __future__ import absolute_import
  from builtins import str
  from builtins import range
  import numpy
  import os
  from .base import Model
  import logging
label_desc: Use image node_id 1 to create a new TensorflowModel object from inherited base classes: Model with example: obj = TensorflowModel(session, input, label, logits, loss, bounds, channel_axis, preprocess)