930f22933523259b1a152dc3174312357fb99fb9,tgen/nn.py,MaxPool1DLayer,connect,#MaxPool1DLayer#Any#,169

Before Change


        self.params = []  // no parameters here

    def connect(self, inputs):
        if self.stride > 1:
            output = T.max(T.reshape(inputs,
                                     (inputs.shape[0] / self.stride,
                                      inputs.shape[1] * self.stride)),
                           axis=0)
        else:
            output = T.max(inputs, axis=0)


//         input_padded = T.shape_padright(inputs.dimshuffle(1, 0), 1)
//         // do the max-pooling
//         pooled = downsample.max_pool_2d(input_padded, (self.downscale_factor, 1), False)
//         // remove the padded dimension + swap dimensions back
//         output = pooled[:, :, 0].dimshuffle(1, 0)

        self.inputs.append(inputs)
        self.outputs.append(output)
        return output

After Change


        // do the max-pooling
        pooled = downsample.max_pool_2d(input_padded, (self.downscale_factor, 1), False)
        // remove the padded dimension + swap dimensions back
        output = pooled[:, :, 0].dimshuffle(1, 0)

        self.inputs.append(inputs)
        self.outputs.append(output)
        return output
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: UFAL-DSG/tgen
Commit Name: 930f22933523259b1a152dc3174312357fb99fb9
Time: 2015-06-15
Author: odusek@ufal.mff.cuni.cz
File Name: tgen/nn.py
Class Name: MaxPool1DLayer
Method Name: connect


Project Name: UFAL-DSG/tgen
Commit Name: 357d1611c7a222b55a5b4f2b3399bde14a9ac0ea
Time: 2015-05-27
Author: odusek@ufal.mff.cuni.cz
File Name: tgen/nn.py
Class Name: MaxPool1DLayer
Method Name: connect


Project Name: pymc-devs/pymc3
Commit Name: c6131064c6467e0927cfdb77b0488dc715aef75d
Time: 2019-02-28
Author: luciano.paz.neuro@gmail.com
File Name: pymc3/distributions/discrete.py
Class Name: Categorical
Method Name: logp