1c6277ecb801327ce4b2e376e1e13a18b79ba52c,neuron/layers.py,DenseSpatialTransformer,call,#DenseSpatialTransformer#Any#,129

Before Change



        // check shapes
        assert len(inputs) == 2, "inputs has to be len 2, found: %d" % len(inputs)
        if inputs[1].shape[1:-1] != inputs[0].shape[1:-1]:
            raise Exception("Shift shape should match vol shape. "
                            "Got: " + inputs[1].shape[1:-1] + " and " + inputs[0].shape[1:-1])

        // prepare location shift
        loc_shift = inputs[1]
        if self.indexing == "xy":  // shift the first two dimensions
            loc_shift_split = tf.split(loc_shift, loc_shift.shape[-1], axis=-1)
            loc_shift_lst = [loc_shift_split[1], loc_shift_split[0], *loc_shift_split[2:]]

After Change


        if not self.is_affine:
            if not all([trf.shape[1:-1][f] != vol.shape[1:-1][f] for f in range(self.ndims)]):
                raise Exception("Shift shape should match vol shape. "
                                "Got: " + str(trf.shape[1:-1]) + " and " + str(vol.shape[1:-1]))

        // go from affine
        if self.is_affine:
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

Instances


Project Name: adalca/neuron
Commit Name: 1c6277ecb801327ce4b2e376e1e13a18b79ba52c
Time: 2018-08-26
Author: adalca@mit.edu
File Name: neuron/layers.py
Class Name: DenseSpatialTransformer
Method Name: call


Project Name: facebookresearch/Horizon
Commit Name: a666c1b9f3099199fe75bce32c228fd4c8290af4
Time: 2018-02-16
Author: jjg@fb.com
File Name: ml/rl/training/conv/discrete_action_conv_trainer.py
Class Name: DiscreteActionConvTrainer
Method Name: __init__


Project Name: Esri/raster-functions
Commit Name: 187140c0d694b144a4ec81553eb2d40bb0df453e
Time: 2015-03-07
Author: akferoz@esri.com
File Name: functions/LinearSpectralUnmixing.py
Class Name: LinearSpectralUnmixing
Method Name: updateRasterInfo