3ba5bc45ad3ceaafdade9378483388a2d2f49f28,kornia/augmentation/base.py,_AugmentationBase,forward,#_AugmentationBase#,214

Before Change


        if return_transform is None:
            return_transform = self.return_transform
        if params is None:
            params = self.__forward_parameters__(batch_shape, self.p, self.p_batch, self.same_on_batch)
        if "batch_prob" not in params:
            params["batch_prob"] = torch.tensor([True] * batch_shape[0])
            warnings.warn("`batch_prob` is not found in params. Will assume applying on all data.")

        self._params = params
        output = self.apply_func(in_tensor, in_transform, self._params, return_transform)
        return _transform_output_shape(output, ori_shape) if self.keepdim else output

After Change


        if return_transform is None:
            return_transform = self.return_transform
        if params is None:
            params = self.forward_parameters(batch_shape)
        if "batch_prob" not in params:
            params["batch_prob"] = torch.tensor([True] * batch_shape[0])
            warnings.warn("`batch_prob` is not found in params. Will assume applying on all data.")

        self._params = params
        output = self.apply_func(in_tensor, in_transform, self._params, return_transform)
        return _transform_output_shape(output, ori_shape) if self.keepdim else output
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 7

Instances


Project Name: arraiy/torchgeometry
Commit Name: 3ba5bc45ad3ceaafdade9378483388a2d2f49f28
Time: 2021-02-24
Author: sj8716643@126.com
File Name: kornia/augmentation/base.py
Class Name: _AugmentationBase
Method Name: forward


Project Name: arraiy/torchgeometry
Commit Name: 3ba5bc45ad3ceaafdade9378483388a2d2f49f28
Time: 2021-02-24
Author: sj8716643@126.com
File Name: kornia/augmentation/base.py
Class Name: _AugmentationBase
Method Name: forward


Project Name: arraiy/torchgeometry
Commit Name: 3ba5bc45ad3ceaafdade9378483388a2d2f49f28
Time: 2021-02-24
Author: sj8716643@126.com
File Name: kornia/augmentation/base.py
Class Name: _BasicAugmentationBase
Method Name: forward


Project Name: arraiy/torchgeometry
Commit Name: 3ba5bc45ad3ceaafdade9378483388a2d2f49f28
Time: 2021-02-24
Author: sj8716643@126.com
File Name: kornia/augmentation/base.py
Class Name: MixAugmentationBase
Method Name: forward