class_docstr: Module, performs supervised or unsupervised whitening.
  
  This is based on the paper "Understanding and Improving Kernel Local Descriptors".
  See :cite:`mukundan2019understanding` for more details.
  
  Args:
      xform: Variant of whitening to use. None, 'lw', 'pca', 'pcaws', 'pcawt'.
      whitening_model: Dictionary with keys 'mean', 'eigvecs', 'eigvals' holding Tensors.
      in_dims: Dimensionality of input descriptors.
      output_dims: (int) Dimensionality reduction.
      keval: Shrinkage parameter.
      t: Attenuation parameter.
  
  Returns:
      l2-normalized, whitened descriptors.
  
  Shape:
      - Input: (B, in_dims, fmap_size, fmap_size)
      - Output: (B, out_dims, fmap_size, fmap_size)
  
  Examples:
      >>> descs = torch.rand(23, 238)
      >>> whitening_model = {'pca': {'mean': torch.zeros(238),
      ...                            'eigvecs': torch.eye(238),
      ...                            'eigvals': torch.ones(238)}}
      >>> whitening = Whitening(xform='pcawt',
      ...                       whitening_model=whitening_model,
      ...                       in_dims=238,
      ...                       output_dims=128,
      ...                       keval=40,
      ...                       t=0.7)
      >>> wdescs = whitening(descs) # 23x128
class_docstr_tok: ["Module",",","performs","supervised","or","unsupervised","whitening",".","This","is","based","on","the","paper","``","Understanding","and","Improving","Kernel","Local","Descriptors","''",".","See",":","cite",":","`","mukundan2019understanding","`","for","more","details",".","Args",":","xform",":","Variant","of","whitening","to","use",".","None",",","'lw","'",",","'pca","'",",","'pcaws","'",",","'pcawt","'",".","whitening_model",":","Dictionary","with","keys","'mean","'",",","'eigvecs","'",",","'eigvals","'","holding","Tensors",".","in_dims",":","Dimensionality","of","input","descriptors",".","output_dims",":","(","int",")","Dimensionality","reduction",".","keval",":","Shrinkage","parameter",".","t",":","Attenuation","parameter",".","Returns",":","l2-normalized",",","whitened","descriptors",".","Shape",":","-","Input",":","(","B",",","in_dims",",","fmap_size",",","fmap_size",")","-","Output",":","(","B",",","out_dims",",","fmap_size",",","fmap_size",")","Examples",":",">",">",">","descs","=","torch.rand","(","23",",","238",")",">",">",">","whitening_model","=","{","'pca","'",":","{","'mean","'",":","torch.zeros","(","238",")",",","...","'eigvecs","'",":","torch.eye","(","238",")",",","...","'eigvals","'",":","torch.ones","(","238",")","}","}",">",">",">","whitening","=","Whitening","(","xform='pcawt","'",",","...","whitening_model=whitening_model",",","...","in_dims=238",",","...","output_dims=128",",","...","keval=40",",","...","t=0.7",")",">",">",">","wdescs","=","whitening","(","descs",")","#","23x128"]
docstr: Modify powerlaw parameter.
code: def _modify_pca(self) -> None:
      """Modify powerlaw parameter."""
      self.pval = 0.5
  
imports: from typing import Any, Dict, List, Tuple, Union
  import torch
  import torch.nn.functional
  from torch import nn
  from kornia.constants import pi
  from kornia.core import Tensor, cos, sin, tensor, zeros
  from kornia.filters import GaussianBlur2d, SpatialGradient
  from kornia.geometry.conversions import cart2pol
  from kornia.utils import create_meshgrid
  from kornia.utils.helpers import map_location_to_cpu
label_desc: Use image node_id 3 for calling the Whitening obj's underlying member method code with example usage: obj._modify_pca() without return types