class_docstr: Create a PaddleModel instance.
  When you need to generate a adversarial sample, you should construct an
  instance of PaddleModel.
  Args:
      program(paddle.fluid.framework.Program): The program of the model
          which generate the adversarial sample.
      input_name(string): The name of the input.
      logits_name(string): The name of the logits.
      predict_name(string): The name of the predict.
      cost_name(string): The name of the loss in the program.
class_docstr_tok: ["Create","a","PaddleModel","instance",".","When","you","need","to","generate","a","adversarial","sample",",","you","should","construct","an","instance","of","PaddleModel",".","Args",":","program","(","paddle.fluid.framework.Program",")",":","The","program","of","the","model","which","generate","the","adversarial","sample",".","input_name","(","string",")",":","The","name","of","the","input",".","logits_name","(","string",")",":","The","name","of","the","logits",".","predict_name","(","string",")",":","The","name","of","the","predict",".","cost_name","(","string",")",":","The","name","of","the","loss","in","the","program","."]
code: def __init__(
      self,
      _predict_program,
      input_name,
      logits_name,
      predict_name,
      bounds,
      channel_axis=3,
      preprocess=None,
  ):
      if preprocess is None:
          preprocess = (0, 1)
  
      super(PaddleBlackBoxModel, self).__init__(
          bounds=bounds,
          channel_axis=channel_axis,
          preprocess=preprocess,
      )
  
      # 用于预测
      self._predict_program = _predict_program
  
      self._place = fluid.CUDAPlace(0) if with_gpu else fluid.CPUPlace()
      self._exe = fluid.Executor(self._place)
  
      self._input_name = input_name
      self._logits_name = logits_name
      self._predict_name = predict_name
  
file_path: AdvBox/adversarialbox/models/paddleBlackBox.py
imports: from __future__ import absolute_import
  import numpy
  import os
  import paddle.fluid
  from .base import Model
label_desc: Use image node_id 1 to create a new PaddleBlackBoxModel object from inherited base classes: Model with example: obj = PaddleBlackBoxModel(_predict_program, input_name, logits_name, predict_name, bounds, channel_axis, preprocess)