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 forward(
      self, input: Tensor, params: Optional[Dict[str, Tensor]] = None
  ) -> Tensor:
      if params is None:
          params = self.forward_parameters(input.shape)
  
      batch_prob = params["batch_prob"][
          (...,) + ((None,) * (len(input.shape) - 1))
      ].to(device=input.device)
  
      if self._gradient_estimator is not None:
          # skip the gradient computation if gradient estimator is provided.
          with torch.no_grad():
              output = self.op(input, params=params)
          output = batch_prob * output + (1 - batch_prob) * input
          if self.magnitude is None:
              # If magnitude is None, make the grad w.r.t the input
              return self._gradient_estimator.apply(input, output)
          # If magnitude is not None, make the grad w.r.t the magnitude
          return self._gradient_estimator.apply(self.magnitude, output)
      return (
          batch_prob * self.op(input, params=params)
          + (1 - batch_prob) * input
      )
  
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 8 for calling the OperationBase obj's underlying member method code with example usage: obj.forward(input, params) and returns: unknown, self, self