8c6540d278883cd3c78b501c69ad67a99d8b34a4,sonnet/python/modules/basic.py,BatchApply,_build,#BatchApply#,878

Before Change


    // with equal shape for the leading `n_dims` dimensions. Typically this is
    // the first input.
    example_input = tf.convert_to_tensor(
        nest.flatten(args)[self._input_example_index])
    def _split_to_original_leading_dims(result):
      return split_leading_dim(result, example_input, self._n_dims)
    return nest.map(_split_to_original_leading_dims, results)

After Change


      A Tensor or nested list or dictionary of Tensors as a result of applying
      the process above. ("None" return values are also supported.)
    
    flattened = nest.flatten_iterable([args, kwargs])
    merged_flattened = [merge_leading_dims(inp, self._n_dims)
                        for inp in flattened]
    merged_args, merged_kwargs = nest.pack_iterable_as([args, kwargs],
                                                       merged_flattened)

    results = self._module(*merged_args, **merged_kwargs)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: deepmind/sonnet
Commit Name: 8c6540d278883cd3c78b501c69ad67a99d8b34a4
Time: 2017-06-12
Author: noreply@google.com
File Name: sonnet/python/modules/basic.py
Class Name: BatchApply
Method Name: _build


Project Name: GPflow/GPflow
Commit Name: 5809cb0b339612434f4f332a91a2cd3e4570c34d
Time: 2018-02-26
Author: james@prowler.io
File Name: gpflow/transforms.py
Class Name: LowerTriangular
Method Name: backward


Project Name: NifTK/NiftyNet
Commit Name: 984d17836d7a6240942cd44f2f61c92a427bb9bb
Time: 2018-04-24
Author: z.eaton-rosen@ucl.ac.uk
File Name: niftynet/layer/crop.py
Class Name: CropLayer
Method Name: layer_op