π Geometric Computer Vision Library for Spatial AI
Python artificial-intelligencecomputer-visiondeep-learninghacktoberfestimage-processingmachine-learningneural-networkpythonpytorchroboticsspatial-ai
add more explicative raise error in size
edgarriba95982f34c471
diff --git a/kornia/augmentation/augmentation.py b/kornia/augmentation/augmentation.pyindex 933443b19..ddaf96516 100644--- a/kornia/augmentation/augmentation.py+++ b/kornia/augmentation/augmentation.py@@ -365,7 +365,8 @@ class CenterCrop(AugmentationBase):elif isinstance(size, int):size_param = torch.tensor([size, size])else:- raise Exception(f"Invalid type: {type(size)}")+ raise Exception(f"Invalid size type. Expected (int, tuple(int, int). "+ f"Got: {type(size)}.")return dict(size=size_param)def forward(self, input: UnionType, params: Optional[Dict[str, torch.Tensor]] = None) -> UnionType: # type: ignore