class_docstr: This module implements square padding for images and object detection bounding boxes in TensorFlow v2.
docstr: Create an instance of ImageSquarePadTensorFlowV2.
  
  :param height: The height of the resized image.
  :param width: The width of the resized image.
  :param channels_first: Set channels first or last.
  :param label_type: String defining the label type. Currently supported: `classification`, `object_detection`
  :param pad_mode: String defining the padding method. Currently supported: `CONSTANT`, `REFLECT`, 'SYMMETRIC`
  :param pad_kwargs: A dictionary of additional keyword arguments used by the `tf.pad` function.
  :param clip_values: Tuple of the form `(min, max)` representing the minimum and maximum values allowed
         for features.
  :param apply_fit: True if applied during fitting/training.
  :param apply_predict: True if applied during predicting.
  :param verbose: Show progress bars.
code: def __init__(
      self,
      channels_first: bool = False,
      label_type: str = "classification",
      pad_mode: str = "CONSTANT",
      pad_kwargs: Optional[Dict[str, Any]] = None,
      clip_values: Optional["CLIP_VALUES_TYPE"] = None,
      apply_fit: bool = True,
      apply_predict: bool = False,
      verbose: bool = False,
  ):
      """
      Create an instance of ImageSquarePadTensorFlowV2.
  
      :param height: The height of the resized image.
      :param width: The width of the resized image.
      :param channels_first: Set channels first or last.
      :param label_type: String defining the label type. Currently supported: `classification`, `object_detection`
      :param pad_mode: String defining the padding method. Currently supported: `CONSTANT`, `REFLECT`, 'SYMMETRIC`
      :param pad_kwargs: A dictionary of additional keyword arguments used by the `tf.pad` function.
      :param clip_values: Tuple of the form `(min, max)` representing the minimum and maximum values allowed
             for features.
      :param apply_fit: True if applied during fitting/training.
      :param apply_predict: True if applied during predicting.
      :param verbose: Show progress bars.
      """
      super().__init__(
          is_fitted=True,
          apply_fit=apply_fit,
          apply_predict=apply_predict,
      )
      self.channels_first = channels_first
      self.label_type = label_type
      self.pad_mode = pad_mode
      self.pad_kwargs = pad_kwargs if pad_kwargs is not None else {}
      self.clip_values = clip_values
      self.verbose = verbose
      self._check_params()
  
file_path: adversarial-robustness-toolbox/art/preprocessing/image/image_square_pad/tensorflow.py
imports: import logging
  from typing import Dict, List, Any, Optional, TYPE_CHECKING, Tuple, Union
  import numpy
  from tqdm.auto import tqdm
  from art.preprocessing.preprocessing import PreprocessorTensorFlowV2
label_desc: Use image node_id 1 to create a new ImageSquarePadTensorFlowV2 object from inherited base classes: PreprocessorTensorFlowV2 with example: obj = ImageSquarePadTensorFlowV2(channels_first, label_type, pad_mode, pad_kwargs, clip_values, apply_fit, apply_predict, verbose)