Skip to content

🐍 Geometric Computer Vision Library for Spatial AI

Use named args in update_attribute (#2946)

Ashwin Nair969169bc2aeb
diff --git a/kornia/augmentation/container/base.py b/kornia/augmentation/container/base.py
index 3c15ac612..da305179a 100644
--- a/kornia/augmentation/container/base.py
+++ b/kornia/augmentation/container/base.py
@@ -114,7 +114,7 @@ class SequentialBase(BasicSequentialBase):
super().__init__(*args)
self._same_on_batch = same_on_batch
self._keepdim = keepdim
- self.update_attribute(same_on_batch, keepdim)
+ self.update_attribute(same_on_batch, keepdim=keepdim)
def update_attribute(
self,
diff --git a/tests/augmentation/test_container.py b/tests/augmentation/test_container.py
index 6dcdac587..3d58a621f 100644
--- a/tests/augmentation/test_container.py
+++ b/tests/augmentation/test_container.py
@@ -546,8 +546,6 @@ class TestAugmentationSequential:
keepdim=keepdim,
)
- aug.keepdim = keepdim # FIXME(@shijianjian): This shouldn't be necessary
-
out = aug(inp, mask)
if keepdim:
assert out[0].shape == img_shape