class_docstr: Get parameters for motion blur.
  
  Args:
      kernel_size: motion kernel size (odd and positive).
          If int, the kernel will have a fixed size.
          If Tuple[int, int], it will randomly generate the value from the range batch-wisely.
      angle: angle of the motion blur in degrees (anti-clockwise rotation).
          If float, it will generate the value from (-angle, angle).
      direction: forward/backward direction of the motion blur.
          Lower values towards -1.0 will point the motion blur towards the back (with angle provided via angle),
          while higher values towards 1.0 will point the motion blur forward. A value of 0.0 leads to a
          uniformly (but still angled) motion blur.
          If float, it will generate the value from (-direction, direction).
          If Tuple[int, int], it will randomly generate the value from the range.
  
  Returns:
      A dict of parameters to be passed for transformation.
          - ksize_factor (Tensor): element-wise kernel size factors with a shape of (B,).
          - angle_factor (Tensor): element-wise angle factors with a shape of (B,).
          - direction_factor (Tensor): element-wise direction factors with a shape of (B,).
  
  Note:
      The generated random numbers are not reproducible across different devices and dtypes. By default,
      the parameters will be generated on CPU in float32. This can be changed by calling
      ``self.set_rng_device_and_dtype(device="cuda", dtype=torch.float64)``.
class_docstr_tok: ["Get","parameters","for","motion","blur",".","Args",":","kernel_size",":","motion","kernel","size","(","odd","and","positive",")",".","If","int",",","the","kernel","will","have","a","fixed","size",".","If","Tuple","[","int",",","int","]",",","it","will","randomly","generate","the","value","from","the","range","batch-wisely",".","angle",":","angle","of","the","motion","blur","in","degrees","(","anti-clockwise","rotation",")",".","If","float",",","it","will","generate","the","value","from","(","-angle",",","angle",")",".","direction",":","forward\/backward","direction","of","the","motion","blur",".","Lower","values","towards","-1.0","will","point","the","motion","blur","towards","the","back","(","with","angle","provided","via","angle",")",",","while","higher","values","towards","1.0","will","point","the","motion","blur","forward",".","A","value","of","0.0","leads","to","a","uniformly","(","but","still","angled",")","motion","blur",".","If","float",",","it","will","generate","the","value","from","(","-direction",",","direction",")",".","If","Tuple","[","int",",","int","]",",","it","will","randomly","generate","the","value","from","the","range",".","Returns",":","A","dict","of","parameters","to","be","passed","for","transformation",".","-","ksize_factor","(","Tensor",")",":","element-wise","kernel","size","factors","with","a","shape","of","(","B",",",")",".","-","angle_factor","(","Tensor",")",":","element-wise","angle","factors","with","a","shape","of","(","B",",",")",".","-","direction_factor","(","Tensor",")",":","element-wise","direction","factors","with","a","shape","of","(","B",",",")",".","Note",":","The","generated","random","numbers","are","not","reproducible","across","different","devices","and","dtypes",".","By","default",",","the","parameters","will","be","generated","on","CPU","in","float32",".","This","can","be","changed","by","calling","``","self.set_rng_device_and_dtype","(","device=","''","cuda","''",",","dtype=torch.float64",")","``","."]
code: def make_samplers(
      self, device: torch.device, dtype: torch.dtype
  ) -> None:
      angle: Tensor = _tuple_range_reader(
          self.angle, 3, device=device, dtype=dtype
      )
      direction = _range_bound(
          self.direction, "direction", center=0.0, bounds=(-1, 1)
      ).to(device=device, dtype=dtype)
      if isinstance(self.kernel_size, int):
          if not (self.kernel_size >= 3 and self.kernel_size % 2 == 1):
              raise AssertionError(
                  f"`kernel_size` must be odd and greater than 3. Got {self.kernel_size}."
              )
          self.ksize_sampler = UniformDistribution(
              self.kernel_size // 2,
              self.kernel_size // 2,
              validate_args=False,
          )
      elif isinstance(self.kernel_size, tuple):
          # kernel_size is fixed across the batch
          if len(self.kernel_size) != 2:
              raise AssertionError(
                  f"`kernel_size` must be (2,) if it is a tuple. Got {self.kernel_size}."
              )
          self.ksize_sampler = UniformDistribution(
              self.kernel_size[0] // 2,
              self.kernel_size[1] // 2,
              validate_args=False,
          )
      else:
          raise TypeError(f"Unsupported type: {type(self.kernel_size)}")
  
      self.yaw_sampler = UniformDistribution(
          angle[0][0], angle[0][1], validate_args=False
      )
      self.pitch_sampler = UniformDistribution(
          angle[1][0], angle[1][1], validate_args=False
      )
      self.roll_sampler = UniformDistribution(
          angle[2][0], angle[2][1], validate_args=False
      )
      self.direction_sampler = UniformDistribution(
          direction[0], direction[1], validate_args=False
      )
  
file_path: kornia/kornia/augmentation/random_generator/_3d/motion_blur.py
imports: from typing import Dict, Tuple, Union
  import torch
  from kornia.augmentation.random_generator.base import RandomGeneratorBase, UniformDistribution
  from kornia.augmentation.utils import _adapted_rsampling, _common_param_check, _range_bound, _tuple_range_reader
  from kornia.core import Tensor, stack
  from kornia.utils.helpers import _extract_device_dtype
label_desc: Use image node_id 3 for calling the MotionBlurGenerator3D obj's underlying member method code with example usage: obj.make_samplers(device, dtype) without return types