4c6458b841bb49610b5cf6b9fbab94df5cad85ee,gpytorch/lazy/interpolated_lazy_tensor.py,InterpolatedLazyTensor,zero_mean_mvn_samples,#InterpolatedLazyTensor#Any#,439

Before Change


    def zero_mean_mvn_samples(self, num_samples):
        base_samples = self.base_lazy_tensor.zero_mean_mvn_samples(num_samples)
        if self.ndimension() == 3:
            res = left_interp(
                self.left_interp_indices, self.left_interp_values, base_samples.permute(1, 2, 0).contiguous()
            )
            return res.permute(2, 0, 1).contiguous()
        else:
            res = left_interp(
                self.left_interp_indices, self.left_interp_values, base_samples.permute(1, 0).contiguous()
            )

After Change


        batch_iter = tuple((i + 1) for i in range(base_samples.dim() - 1))
        base_samples = base_samples.permute(*batch_iter, 0)
        res = left_interp(self.left_interp_indices, self.left_interp_values, base_samples).contiguous()
        batch_iter = tuple(i for i in range(res.dim() - 1))
        return res.permute(-1, *batch_iter).contiguous()

    def _getitem_nonbatch(self, row_index, col_index, first_tensor_index_dim=None):
        
        Given an index over rows and columns, gets those items from the LazyTensor.
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 8

Instances


Project Name: cornellius-gp/gpytorch
Commit Name: 4c6458b841bb49610b5cf6b9fbab94df5cad85ee
Time: 2019-01-23
Author: gpleiss@gmail.com
File Name: gpytorch/lazy/interpolated_lazy_tensor.py
Class Name: InterpolatedLazyTensor
Method Name: zero_mean_mvn_samples


Project Name: elfi-dev/elfi
Commit Name: 23f7a6de9a581d18a1fb87582f50b6efb72e7683
Time: 2017-09-08
Author: jarno.lintusaari@aalto.fi
File Name: elfi/executor.py
Class Name: Executor
Method Name: get_execution_order


Project Name: tensorflow/datasets
Commit Name: 94bddd88f3ece6669c77291d84a7f8531ab4c6b3
Time: 2020-11-05
Author: epot@google.com
File Name: tensorflow_datasets/scripts/documentation/dataset_markdown_builder.py
Class Name: VersionSection
Method Name: get_key


Project Name: stanford-mast/nn_dataflow
Commit Name: 9523d183ba4a42ae8098b0bf0268612c95a556c1
Time: 2017-06-21
Author: mgao12@stanford.edu
File Name: nn_dataflow/Network.py
Class Name: Network
Method Name: prev_layers