Skip to content

🐍 Geometric Computer Vision Library for Spatial AI

640 B
Raw Blame

A wrong input rank raises kornia.core.exceptions.InputRankError, with one message format, from every augmentation entry point: the 2D and 3D classes, validate_tensor, AugmentationSequential, ImageSequential, PatchSequential and VideoSequential. They used to raise ValueError, RuntimeError or AssertionError with different messages; InputRankError is a ShapeError (ValueError) and also a RuntimeError and an AssertionError, so existing except clauses still catch it. validate_tensor now accepts the (H, W) and (C, H, W) inputs that forward accepts (and their 3D counterparts) instead of rejecting them.