85fd9ee010628a327a3e5b223106c3718c234cbd,kornia/utils/grid.py,,create_meshgrid3d,#Any#Any#Any#Any#,42

Before Change


    else:
        z = torch.linspace(0, depth - 1, depth)
    z = z.view(depth, 1, 1, 1)
    grid3d = torch.cat([z.repeat(1, height, width, 1).contiguous(), grid2d.repeat(depth, 1, 1, 1)], dim=3)
    return grid3d.unsqueeze(0)  // 1xDxHxWx3

After Change


    ys: Optional[torch.Tensor] = None
    zs: Optional[torch.Tensor] = None
    if normalized_coordinates:
        xs = torch.linspace(-1, 1, width)
        ys = torch.linspace(-1, 1, height)
        zs = torch.linspace(-1, 1, depth)
    else:
        xs = torch.linspace(0, width - 1, width)
        ys = torch.linspace(0, height - 1, height)
        zs = torch.linspace(0, depth - 1, depth)
    // generate grid by stacking coordinates
    base_grid: torch.Tensor = torch.stack(
        torch.meshgrid([zs, xs, ys])).transpose(1, 2)  // 3xHxW
    return base_grid.unsqueeze(0).permute(0, 3, 4, 2, 1)  // 1xHxWx3
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 6

Instances


Project Name: arraiy/torchgeometry
Commit Name: 85fd9ee010628a327a3e5b223106c3718c234cbd
Time: 2019-11-29
Author: ducha.aiki@gmail.com
File Name: kornia/utils/grid.py
Class Name:
Method Name: create_meshgrid3d


Project Name: pytorch/audio
Commit Name: 3047dc9b500266d8197139fad5ef3a8a4a459985
Time: 2021-02-28
Author: toastedjcaw@gmail.com
File Name: test/torchaudio_unittest/functional/batch_consistency_test.py
Class Name: TestFunctional
Method Name: assert_batch_consistency


Project Name: AIRLab-POLIMI/mushroom
Commit Name: ff55647673a7279b47d1268699839b92aca3e953
Time: 2021-02-10
Author: carlo.deramo@gmail.com
File Name: mushroom_rl/algorithms/value/dqn/rainbow.py
Class Name: RainbowNetwork
Method Name: forward