π Geometric Computer Vision Library for Spatial AI
Python artificial-intelligencecomputer-visiondeep-learninghacktoberfestimage-processingmachine-learningneural-networkpythonpytorchroboticsspatial-ai
docs(augmentation): refresh RandomPerspective3D's stale doctest output (#4539)
Leonardo Vanniff9c0e4c69a1
diff --git a/changelog.d/4539.fixed.md b/changelog.d/4539.fixed.mdnew file mode 100644index 000000000..3edc6b764--- /dev/null+++ b/changelog.d/4539.fixed.md@@ -0,0 +1,3 @@+`RandomPerspective3D`'s docstring example printed the output of the 3D sampling-grid defect fixed+in #4514, so its values were a permutation of the correct ones. The example now shows what the+class returns. Only the docstring changes; no behaviour does.diff --git a/kornia/augmentation/_3d/geometric/perspective.py b/kornia/augmentation/_3d/geometric/perspective.pyindex 98165b41e..6dc641ba4 100644--- a/kornia/augmentation/_3d/geometric/perspective.py+++ b/kornia/augmentation/_3d/geometric/perspective.py@@ -62,15 +62,15 @@ class RandomPerspective3D(GeometricAugmentationBase3D):... ]]])>>> aug = RandomPerspective3D(0.5, p=1., align_corners=True)>>> aug(inputs)- tensor([[[[[0.3976, 0.5507, 0.0000],- [0.0901, 0.3668, 0.0000],+ tensor([[[[[0.3976, 0.2651, 0.0000],+ [0.5507, 0.4657, 0.1153],[0.0000, 0.0000, 0.0000]],<BLANKLINE>- [[0.2651, 0.4657, 0.0000],- [0.1390, 0.5174, 0.0000],+ [[0.0901, 0.1390, 0.0000],+ [0.3668, 0.5174, 0.0000],[0.0000, 0.0000, 0.0000]],<BLANKLINE>- [[0.0000, 0.1153, 0.0000],+ [[0.0000, 0.0000, 0.0000],[0.0000, 0.0000, 0.0000],[0.0000, 0.0000, 0.0000]]]]])