ee45c6c2da78ae944d6bb0043d6414122590299e,kornia/filters/kernels.py,,get_motion_kernel3d,#Any#Any#Any#,684

Before Change



    // Element-wise linspace
    kernel[:, kernel_tuple[0] // 2, kernel_tuple[0] // 2, :] = torch.stack(
        [(direction - (1 / (kernel_tuple[0] - 1)) * i) for i in range(kernel_tuple[0])], dim=-1)
    kernel = kernel.unsqueeze(1)
    // rotate (counterclockwise) kernel by given angle
    kernel = rotate3d(kernel, angle[:, 0], angle[:, 1], angle[:, 2], mode="nearest", align_corners=True)

After Change


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

    device, dtype = _extract_device_dtype([
        angle if isinstance(angle, torch.Tensor) else None,
        direction if isinstance(direction, torch.Tensor) else None,
    ])

    if not isinstance(angle, torch.Tensor):
        angle = torch.tensor([angle], device=device, dtype=dtype)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 2

Instances


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


Project Name: arraiy/torchgeometry
Commit Name: 854f604719b6a571e47ad3ca8b758cec4133d2f7
Time: 2021-01-05
Author: sj8716643@126.com
File Name: kornia/augmentation/augmentation.py
Class Name: RandomSharpness
Method Name: __init__


Project Name: arraiy/torchgeometry
Commit Name: 854f604719b6a571e47ad3ca8b758cec4133d2f7
Time: 2021-01-05
Author: sj8716643@126.com
File Name: kornia/augmentation/augmentation.py
Class Name: RandomPosterize
Method Name: __init__