class_docstr: Base class of differentiable augmentation operations.
  
  Args:
      operation: Kornia augmentation module.
      initial_magnitude: targeted magnitude parameter name and its initial magnitude value.
          The magnitude parameter name shall align with the attribute inside the random_generator
          in each augmentation. If None, the augmentation will be randomly applied according to
          the augmentation sampling range.
      temperature: temperature for RelaxedBernoulli distribution used during training.
      is_batch_operation: determine if to obtain the probability from `p` or `p_batch`.
          Set to True for most non-shape-persistent operations (e.g. cropping).
class_docstr_tok: ["Base","class","of","differentiable","augmentation","operations",".","Args",":","operation",":","Kornia","augmentation","module",".","initial_magnitude",":","targeted","magnitude","parameter","name","and","its","initial","magnitude","value",".","The","magnitude","parameter","name","shall","align","with","the","attribute","inside","the","random_generator","in","each","augmentation",".","If","None",",","the","augmentation","will","be","randomly","applied","according","to","the","augmentation","sampling","range",".","temperature",":","temperature","for","RelaxedBernoulli","distribution","used","during","training",".","is_batch_operation",":","determine","if","to","obtain","the","probability","from","`","p","`","or","`","p_batch","`",".","Set","to","True","for","most","non-shape-persistent","operations","(","e.g",".","cropping",")","."]
code: def __init__(
      self,
      operation: _AugmentationBase,
      initial_magnitude: Optional[
          List[Tuple[str, Optional[float]]]
      ] = None,
      temperature: float = 0.1,
      is_batch_operation: bool = False,
      magnitude_fn: Optional[Callable[[Tensor], Tensor]] = None,
      gradient_estimator: Optional[Type[Function]] = None,
      symmetric_megnitude: bool = False,
  ) -> None:
      super().__init__()
      if not isinstance(operation, _AugmentationBase):
          raise ValueError(
              f"Only Kornia augmentations supported. Got {operation}."
          )
  
      self.op = operation
  
      self._init_magnitude(initial_magnitude)
  
      # Avoid skipping the sampling in `__batch_prob_generator__`
      self.probability_range = (1e-7, 1 - 1e-7)
      self._is_batch_operation = is_batch_operation
      if is_batch_operation:
          self._probability = nn.Parameter(
              torch.empty(1).fill_(self.op.p_batch)
          )
      else:
          self._probability = nn.Parameter(
              torch.empty(1).fill_(self.op.p)
          )
  
      if temperature < 0:
          raise ValueError(
              f"Expect temperature value greater than 0. Got {temperature}."
          )
      self.register_buffer(
          "temperature", torch.empty(1).fill_(temperature)
      )
  
      self.symmetric_megnitude = symmetric_megnitude
      self._magnitude_fn = self._init_magnitude_fn(magnitude_fn)
      self._gradient_estimator = gradient_estimator
  
imports: from typing import Callable, Dict, List, Optional, Tuple, Type, TypeVar
  import torch
  from torch import nn
  from torch.autograd import Function
  from torch.distributions import Bernoulli, RelaxedBernoulli
  from kornia.augmentation.base import _AugmentationBase
  from kornia.core import Module, Tensor
label_desc: Use image node_id 1 to create a new OperationBase object from inherited base classes: Module with example: obj = OperationBase(operation, initial_magnitude, temperature, is_batch_operation, magnitude_fn, gradient_estimator, symmetric_megnitude)