d71bc3c8b533c319e49cf6b347d13c48c925ea93,gpytorch/utils/getitem.py,,_compute_getitem_size,#Any#Any#,10

Before Change



            else:
                if settings.debug.on():
                    if idx.numel() != tensor_idx_shape:
                        raise IndexError(
                            "index element {} is an invalid size: expected tensor indices of size {}, got "
                            "{}.".format(i, tensor_idx_shape, idx.numel())
                        )

    // If we don"t have a continuous set of tensor indices, then the tensor indexed part
    // goes to the front
    if not continuous_tensor_index:
        del final_shape[first_tensor_idx]
        final_shape.insert(0, tensor_idx_shape)

After Change


    // If we don"t have a continuous set of tensor indices, then the tensor indexed part
    // goes to the front
    if tensor_idx is not None:
        final_shape = final_shape[:tensor_idx] + list(tensor_idx_shape) + final_shape[tensor_idx:]

    return torch.Size(final_shape)

Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 5

Instances


Project Name: cornellius-gp/gpytorch
Commit Name: d71bc3c8b533c319e49cf6b347d13c48c925ea93
Time: 2019-03-18
Author: gpleiss@gmail.com
File Name: gpytorch/utils/getitem.py
Class Name:
Method Name: _compute_getitem_size


Project Name: arraiy/torchgeometry
Commit Name: 45aac954cfe5ff814fe34492462d3c736fb8c36f
Time: 2020-01-23
Author: diegovd0296@gmail.com
File Name: kornia/augmentation/functional.py
Class Name:
Method Name: apply_rotation


Project Name: open-mmlab/mmdetection
Commit Name: b69667001f250a54a37129a000a8d5160e047239
Time: 2019-12-24
Author: erotemic@gmail.com
File Name: mmdet/core/bbox/assigners/max_iou_assigner.py
Class Name: MaxIoUAssigner
Method Name: assign_wrt_overlaps


Project Name: cornellius-gp/gpytorch
Commit Name: 43c471faef2844c4d95636e888018239ab4ea6a9
Time: 2020-07-29
Author: gardner.jake@gmail.com
File Name: gpytorch/lazy/lazy_tensor.py
Class Name: LazyTensor
Method Name: inv_quad