bd21bb4fec8d10b257ceccc3d302abd6d5b7c7d5,kornia/filters/kernels.py,,get_motion_kernel2d,#Any#Any#Any#,447

Before Change


    if not isinstance(kernel_size, int) or kernel_size % 2 == 0 or kernel_size < 3:
        raise TypeError("ksize must be an odd integer >= than 3")

    if not isinstance(angle, float):
        raise TypeError("angle must be a float")

    if not isinstance(direction, float):
        raise TypeError("direction must be a float")

    kernel_tuple: Tuple[int, int] = (kernel_size, kernel_size)

After Change


    if not isinstance(kernel_size, int) or kernel_size % 2 == 0 or kernel_size < 3:
        raise TypeError("ksize must be an odd integer >= than 3")

    if not isinstance(angle, torch.Tensor):
        angle = torch.tensor(angle)

    assert angle.dim() == 0, f"angle must be a 0-dim tensor. Got {angle}."

    if not isinstance(direction, torch.Tensor):
        direction = torch.tensor(direction)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 6

Instances


Project Name: arraiy/torchgeometry
Commit Name: bd21bb4fec8d10b257ceccc3d302abd6d5b7c7d5
Time: 2020-08-26
Author: sj8716643@126.com
File Name: kornia/filters/kernels.py
Class Name:
Method Name: get_motion_kernel2d


Project Name: arraiy/torchgeometry
Commit Name: dac6839364405ff932bc33a5ca7845cba4f8b4ce
Time: 2019-10-07
Author: edgar.riba@gmail.com
File Name: kornia/color/adjust.py
Class Name:
Method Name: adjust_brightness


Project Name: OpenMined/PySyft
Commit Name: 35ea7282f484091070e0e2af6754902ec0cf34b1
Time: 2020-11-09
Author: rladhkstn8@gmail.com
File Name: syft/frameworks/torch/tensors/interpreters/precision.py
Class Name: FixedPrecisionTensor
Method Name: mul_and_div