class_docstr: Module for robust geometry estimation with RANSAC. https://en.wikipedia.org/wiki/Random_sample_consensus.
  
  Args:
      model_type: type of model to estimate: "homography", "fundamental", "fundamental_7pt",
          "homography_from_linesegments".
      inliers_threshold: threshold for the correspondence to be an inlier.
      batch_size: number of generated samples at once.
      max_iterations: maximum batches to generate. Actual number of models to try is ``batch_size * max_iterations``.
      confidence: desired confidence of the result, used for the early stopping.
      max_local_iterations: number of local optimization (polishing) iterations.
class_docstr_tok: ["Module","for","robust","geometry","estimation","with","RANSAC",".","https",":","\/\/en.wikipedia.org\/wiki\/Random_sample_consensus",".","Args",":","model_type",":","type","of","model","to","estimate",":","``","homography","''",",","``","fundamental","''",",","``","fundamental_7pt","''",",","``","homography_from_linesegments","''",".","inliers_threshold",":","threshold","for","the","correspondence","to","be","an","inlier",".","batch_size",":","number","of","generated","samples","at","once",".","max_iterations",":","maximum","batches","to","generate",".","Actual","number","of","models","to","try","is","``","batch_size","*","max_iterations","``",".","confidence",":","desired","confidence","of","the","result",",","used","for","the","early","stopping",".","max_local_iterations",":","number","of","local","optimization","(","polishing",")","iterations","."]
code: def validate_inputs(
      self, kp1: Tensor, kp2: Tensor, weights: Optional[Tensor] = None
  ) -> None:
      if self.model_type in ["homography", "fundamental"]:
          KORNIA_CHECK_SHAPE(kp1, ["N", "2"])
          KORNIA_CHECK_SHAPE(kp2, ["N", "2"])
          if not (kp1.shape[0] == kp2.shape[0]) or (
              kp1.shape[0] < self.minimal_sample_size
          ):
              raise ValueError(
                  "kp1 and kp2 should be                                  equal shape at at least"
                  f" [{self.minimal_sample_size}, 2],                                  got {kp1.shape}, {kp2.shape}"
              )
      if self.model_type == "homography_from_linesegments":
          KORNIA_CHECK_SHAPE(kp1, ["N", "2", "2"])
          KORNIA_CHECK_SHAPE(kp2, ["N", "2", "2"])
          if not (kp1.shape[0] == kp2.shape[0]) or (
              kp1.shape[0] < self.minimal_sample_size
          ):
              raise ValueError(
                  "kp1 and kp2 should be                                  equal shape at at least"
                  f" [{self.minimal_sample_size}, 2, 2],                                  got {kp1.shape},"
                  f" {kp2.shape}"
              )
  
file_path: kornia/kornia/geometry/ransac.py
imports: import math
  from functools import partial
  from typing import Callable, Optional, Tuple
  import torch
  from kornia.core import Device, Module, Tensor, zeros
  from kornia.core.check import KORNIA_CHECK_SHAPE
  from kornia.geometry import find_fundamental, find_homography_dlt, find_homography_dlt_iterated, find_homography_lines_dlt, find_homography_lines_dlt_iterated, symmetrical_epipolar_distance
  from kornia.geometry.homography import line_segment_transfer_error_one_way, oneway_transfer_error, sample_is_valid_for_homography
label_desc: Use image node_id 9 for calling the RANSAC obj's underlying member method code with example usage: obj.validate_inputs(kp1, kp2, weights) without return types