class_docstr: Helper class to store data about images generated by attacks.
docstr: Helper method which loads dataset and determines clipping range.
  
  Args:
    dataset_dir: location of the dataset.
    epsilon: maximum allowed size of adversarial perturbation.
docstr_tok: ["Helper","method","which","loads","dataset","and","determines","clipping","range",".","Args",":","dataset_dir",":","location","of","the","dataset",".","epsilon",":","maximum","allowed","size","of","adversarial","perturbation","."]
code: def _load_dataset_clipping(self, dataset_dir, epsilon):
      """Helper method which loads dataset and determines clipping range.
  
      Args:
        dataset_dir: location of the dataset.
        epsilon: maximum allowed size of adversarial perturbation.
      """
      self.dataset_max_clip = {}
      self.dataset_min_clip = {}
      self._dataset_image_count = 0
      for fname in os.listdir(dataset_dir):
          if not fname.endswith(".png"):
              continue
          image_id = fname[:-4]
          image = np.array(
              Image.open(os.path.join(dataset_dir, fname)).convert(
                  "RGB"
              )
          )
          image = image.astype("int32")
          self._dataset_image_count += 1
          self.dataset_max_clip[image_id] = np.clip(
              image + epsilon, 0, 255
          ).astype("uint8")
          self.dataset_min_clip[image_id] = np.clip(
              image - epsilon, 0, 255
          ).astype("uint8")
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import argparse
  import csv
  import json
  import os
  import subprocess
  import numpy
  from PIL import Image
label_desc: Use image node_id 2 for calling the AttacksOutput obj's underlying member method code with example usage: obj._load_dataset_clipping(dataset_dir, epsilon) without return types