class_docstr: Class performing adversarial training following the DP-InstaHide protocol.
  
  Uses data augmentation methods in conjunction with some type of additive noise.
  
  | Paper link: https://arxiv.org/abs/2103.02079
class_docstr_tok: ["Class","performing","adversarial","training","following","the","DP-InstaHide","protocol",".","Uses","data","augmentation","methods","in","conjunction","with","some","type","of","additive","noise",".","|","Paper","link",":","https",":","\/\/arxiv.org\/abs\/2103.02079"]
docstr: Create an :class:`.DPInstaHideTrainer` instance.
  
  :param classifier: The model to train using the protocol.
  :param augmentations: The preprocessing data augmentation defence(s) to be applied.
  :param noise: The type of additive noise to use: 'gaussian' | 'laplacian' | 'exponential'.
  :param loc: The location or mean parameter of the distribution to sample.
  :param scale: The scale or standard deviation parameter of the distribution to sample.
  :param clip_values: Tuple of the form `(min, max)` representing the minimum and maximum values allowed
         for features.
docstr_tok: ["Create","an",":","class",":","`",".DPInstaHideTrainer","`","instance",".",":","param","classifier",":","The","model","to","train","using","the","protocol",".",":","param","augmentations",":","The","preprocessing","data","augmentation","defence","(","s",")","to","be","applied",".",":","param","noise",":","The","type","of","additive","noise","to","use",":","'gaussian","'","|","'laplacian","'","|","'exponential","'",".",":","param","loc",":","The","location","or","mean","parameter","of","the","distribution","to","sample",".",":","param","scale",":","The","scale","or","standard","deviation","parameter","of","the","distribution","to","sample",".",":","param","clip_values",":","Tuple","of","the","form","`","(","min",",","max",")","`","representing","the","minimum","and","maximum","values","allowed","for","features","."]
code: def __init__(
      self,
      classifier: "CLASSIFIER_LOSS_GRADIENTS_TYPE",
      augmentations: Union["Preprocessor", List["Preprocessor"]],
      noise: Literal[
          "gaussian", "laplacian", "exponential"
      ] = "laplacian",
      loc: Union[int, float] = 0.0,
      scale: Union[int, float] = 0.03,
      clip_values: "CLIP_VALUES_TYPE" = (0.0, 1.0),
  ):
      """
      Create an :class:`.DPInstaHideTrainer` instance.
  
      :param classifier: The model to train using the protocol.
      :param augmentations: The preprocessing data augmentation defence(s) to be applied.
      :param noise: The type of additive noise to use: 'gaussian' | 'laplacian' | 'exponential'.
      :param loc: The location or mean parameter of the distribution to sample.
      :param scale: The scale or standard deviation parameter of the distribution to sample.
      :param clip_values: Tuple of the form `(min, max)` representing the minimum and maximum values allowed
             for features.
      """
      from art.defences.preprocessor import Preprocessor
  
      super().__init__(classifier)
      if isinstance(augmentations, Preprocessor):
          self.augmentations = [augmentations]
      else:
          self.augmentations = augmentations
      self.noise = noise
      self.loc = loc
      self.scale = scale
      self.clip_values = clip_values
  
file_path: adversarial-robustness-toolbox/art/defences/trainer/dp_instahide_trainer.py
imports: from __future__ import absolute_import, division, print_function, unicode_literals
  import logging
  import sys
  import time
  from typing import List, Optional, Union, Tuple, TYPE_CHECKING
  import numpy
  from tqdm.auto import trange
  from art.defences.trainer.trainer import Trainer
label_desc: Use image node_id 1 to create a new DPInstaHideTrainer object from inherited base classes: Trainer with example: obj = DPInstaHideTrainer(classifier, augmentations, noise, loc, scale, clip_values)