e85e31cfbd43e88184ed08cb977e2acaf5752d86,spacy/_ml.py,PrecomputableAffine,_backprop_padding,#PrecomputableAffine#Any#Any#,151

Before Change


    def _backprop_padding(self, dY, ids):
        // (1, nF, nO, nP) += (nN, nF, nO, nP) where IDs (nN, nF) < 0
        d_feats = dY[ids]
        ids = ids.reshape((ids.shape[0], ids.shape[1], 1, 1))
        d_feats *= ids < 0
        self.d_pad += d_feats.sum(axis=0, keepdims=True)
        return dY, ids

    @staticmethod
    def init_weights(model):

After Change


        // (1, nF, nO, nP) += (nN, nF, nO, nP) where IDs (nN, nF) < 0
        for i in range(ids.shape[0]):
            for j in range(ids.shape[1]):
                if ids[i,j] < 0:
                    self.d_pad[0,j] += dY[i, j]
        return dY, ids

    @staticmethod
    def init_weights(model):
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 7

Instances


Project Name: explosion/spaCy
Commit Name: e85e31cfbd43e88184ed08cb977e2acaf5752d86
Time: 2017-11-01
Author: honnibal+gh@gmail.com
File Name: spacy/_ml.py
Class Name: PrecomputableAffine
Method Name: _backprop_padding


Project Name: freelunchtheorem/Conditional_Density_Estimation
Commit Name: aa50234c0e3854567214a3109188ee9bedc33551
Time: 2019-01-18
Author: jonas.rothfuss@gmx.de
File Name: cde/BaseConditionalDensity.py
Class Name: ConditionalDensity
Method Name: _mean_pdf


Project Name: automl/auto-sklearn
Commit Name: 432331c2ea292f2f8b756901ea3c8bda04817ec5
Time: 2017-10-20
Author: feurerm@informatik.uni-freiburg.de
File Name: autosklearn/estimators.py
Class Name: AutoMLClassifier
Method Name: _process_target_classes