class_docstr: Second-order gradient-based attack on the logits. [#Miy15]_
  The attack calculate an untargeted adversarial perturbation by performing a
  approximated second order optimization step on the KL divergence between
  the unperturbed predictions and the predictions for the adversarial
  perturbation. This attack was originally introduced as the
  Virtual Adversarial Training [#Miy15]_ method.
  
  Args:
      steps : Number of update steps.
      xi : L2 distance between original image and first adversarial proposal.
  
  
  References:
      .. [#Miy15] Takeru Miyato, Shin-ichi Maeda, Masanori Koyama, Ken Nakae,
          Shin Ishii, "Distributional Smoothing with Virtual Adversarial Training",
          https://arxiv.org/abs/1507.00677
class_docstr_tok: ["Second-order","gradient-based","attack","on","the","logits",".","[","#","Miy15","]","_","The","attack","calculate","an","untargeted","adversarial","perturbation","by","performing","a","approximated","second","order","optimization","step","on","the","KL","divergence","between","the","unperturbed","predictions","and","the","predictions","for","the","adversarial","perturbation",".","This","attack","was","originally","introduced","as","the","Virtual","Adversarial","Training","[","#","Miy15","]","_","method",".","Args",":","steps",":","Number","of","update","steps",".","xi",":","L2","distance","between","original","image","and","first","adversarial","proposal",".","References",":","..","[","#","Miy15","]","Takeru","Miyato",",","Shin-ichi","Maeda",",","Masanori","Koyama",",","Ken","Nakae",",","Shin","Ishii",",","``","Distributional","Smoothing","with","Virtual","Adversarial","Training","''",",","https",":","\/\/arxiv.org\/abs\/1507.00677"]
code: def __init__(self, steps: int, xi: float = 1e-6):
      self.steps = steps
      self.xi = xi
  
file_path: foolbox/foolbox/attacks/virtual_adversarial_attack.py
imports: from typing import Union, Any
  import eagerpy
  from ..models import Model
  from ..criteria import Misclassification
  from ..distances import l2
  from ..devutils import flatten, atleast_kd
  from .base import FixedEpsilonAttack
  from .base import get_criterion
  from .base import T
  from .base import raise_if_kwargs
  from .base import verify_input_bounds
label_desc: Use image node_id 1 to create a new VirtualAdversarialAttack object from inherited base classes: FixedEpsilonAttack with example: obj = VirtualAdversarialAttack(steps, xi)