afc71e321e8e849d27e9d3b2f053c9ead11fd171,thinc/neural/vecs2vec.py,MeanPooling,predict,#MeanPooling#Any#,6

Before Change


class MeanPooling(Model):
    name = "mean-pool"
    def predict(self, X):
        means = []
        for x in X:
            means.append(x.mean(axis=0))
        return self.ops.asarray(means)

    def begin_update(self, X, drop=0.0):
        X, bp_dropout = self.ops.dropout(X, drop)

After Change


        start = 0
        for i, length in enumerate(lengths):
            end = start + length
            means[i] = X[start : end].mean(axis=0)
            start = end
        assert means.shape == (len(seqs), seqs[0].shape[1])
        return means
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 7

Instances


Project Name: explosion/thinc
Commit Name: afc71e321e8e849d27e9d3b2f053c9ead11fd171
Time: 2017-02-04
Author: honnibal@gmail.com
File Name: thinc/neural/vecs2vec.py
Class Name: MeanPooling
Method Name: predict


Project Name: scikit-learn-contrib/DESlib
Commit Name: f7a04171e58eb43dfe5b18d06c76481cdf1c5da9
Time: 2018-03-29
Author: rafaelmenelau@gmail.com
File Name: deslib/dcs/lca.py
Class Name: LCA
Method Name: estimate_competence


Project Name: Esri/raster-functions
Commit Name: e698c1f1bbab1691152743a4516cf574c406e391
Time: 2015-02-11
Author: jwasilkowski@esri.com
File Name: functions/LinearSpectralUnmixing.py
Class Name: LinearSpectralUnmixing
Method Name: updatePixels