class_docstr: This attack was originally proposed by Miyato et al. (2016) and was used for virtual adversarial training.
  
  | Paper link: https://arxiv.org/abs/1507.00677
class_docstr_tok: ["This","attack","was","originally","proposed","by","Miyato","et","al",".","(","2016",")","and","was","used","for","virtual","adversarial","training",".","|","Paper","link",":","https",":","\/\/arxiv.org\/abs\/1507.00677"]
docstr: Apply L_2 batch normalization on `x`.
  
  :param x: The input array batch to normalize.
  :return: The normalized version of `x`.
docstr_tok: ["Apply","L_2","batch","normalization","on","`","x","`",".",":","param","x",":","The","input","array","batch","to","normalize",".",":","return",":","The","normalized","version","of","`","x","`","."]
code: def _normalize(x: np.ndarray) -> np.ndarray:
      """
      Apply L_2 batch normalization on `x`.
  
      :param x: The input array batch to normalize.
      :return: The normalized version of `x`.
      """
      norm = np.atleast_1d(np.linalg.norm(x, axis=1))
      norm[norm == 0] = 1
      normalized_x = x / np.expand_dims(norm, axis=1)
  
      return normalized_x
  
file_path: adversarial-robustness-toolbox/art/attacks/evasion/virtual_adversarial.py
imports: from __future__ import absolute_import, division, print_function, unicode_literals
  import logging
  from typing import Optional, TYPE_CHECKING
  import numpy
  from tqdm.auto import trange
  from art.attacks.attack import EvasionAttack
  from art.config import ART_NUMPY_DTYPE
  from art.estimators.estimator import BaseEstimator
  from art.estimators.classification.classifier import ClassifierMixin
label_desc: Use image node_id 3 for calling the VirtualAdversarialMethod obj's underlying member method code with example usage: obj._normalize(x) and returns: normalized_x