π Geometric Computer Vision Library for Spatial AI
Python artificial-intelligencecomputer-visiondeep-learninghacktoberfestimage-processingmachine-learningneural-networkpythonpytorchroboticsspatial-ai
Fixed typing (#1148)
Jian Shidd03a6b45c68
diff --git a/kornia/augmentation/container/patch.py b/kornia/augmentation/container/patch.pyindex a257a8318..6b84b9ed9 100644--- a/kornia/augmentation/container/patch.py+++ b/kornia/augmentation/container/patch.py@@ -262,20 +262,20 @@ class PatchSequential(ImageSequential):with_mix = mix_addedfor s in seq:if isinstance(s[1], (_AugmentationBase, MixAugmentationBase, SequentialBase)):- yield ParamItem(s[0], s[1].forward_parameters(batch_shape[1:])), i+ yield ParamItem(s[0], s[1].forward_parameters(torch.Size(batch_shape[1:]))), ielse:yield ParamItem(s[0], None), ielif not self.same_on_batch and not self.random_apply:for i, nchild in enumerate(self.named_children()):if isinstance(nchild[1], (_AugmentationBase, MixAugmentationBase, SequentialBase)):- yield ParamItem(nchild[0], nchild[1].forward_parameters(batch_shape[1:])), i+ yield ParamItem(nchild[0], nchild[1].forward_parameters(torch.Size(batch_shape[1:]))), ielse:yield ParamItem(nchild[0], None), ielif not self.random_apply:# same_on_batch + not random_apply => location-wise augmentationfor i, nchild in enumerate(islice(cycle(self.named_children()), batch_shape[0])):if isinstance(nchild[1], (_AugmentationBase, MixAugmentationBase, SequentialBase)):- yield ParamItem(nchild[0], nchild[1].forward_parameters(batch_shape[1:])), i+ yield ParamItem(nchild[0], nchild[1].forward_parameters(torch.Size(batch_shape[1:]))), ielse:yield ParamItem(nchild[0], None), ielse:@@ -286,7 +286,7 @@ class PatchSequential(ImageSequential):with_mix = mix_addedfor s in seq:if isinstance(s[1], (_AugmentationBase, MixAugmentationBase, SequentialBase)):- yield ParamItem(s[0], s[1].forward_parameters(batch_shape[1:])), i+ yield ParamItem(s[0], s[1].forward_parameters(torch.Size(batch_shape[1:]))), ielse:yield ParamItem(s[0], None), i