3611452afac53b53f3e41ee83d7fc7bd811ffb81,thinc/neural/_classes/batchnorm.py,BatchNorm,begin_update,#BatchNorm#Any#Any#,43

Before Change


        // Should we consider a sample be the instance, or the batch?
        diff = X - self.m
        incr = (1-alpha) * diff
        self.m += incr.mean(axis=0)
        self.v += (diff * incr).mean(axis=0)
        self.v *= alpha

        Xhat = _forward(self.ops, X, mu, var)

After Change



    def begin_update(self, X, drop=0.):
        if drop is None:
            return self.predict(X), None
        assert X.dtype == "float32"
        X, backprop_child = self.child.begin_update(X, drop=0.)
        N, mu, var = _get_moments(self.ops, X)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: explosion/thinc
Commit Name: 3611452afac53b53f3e41ee83d7fc7bd811ffb81
Time: 2018-03-14
Author: honnibal+gh@gmail.com
File Name: thinc/neural/_classes/batchnorm.py
Class Name: BatchNorm
Method Name: begin_update


Project Name: AIRLab-POLIMI/mushroom
Commit Name: b2e4918d2681ca5637d03686b68ddd3d4d3fda16
Time: 2017-10-21
Author: carloderamo@gmail.com
File Name: mushroom/algorithms/value/dqn.py
Class Name: WeightedDQN
Method Name: _next_q


Project Name: explosion/thinc
Commit Name: ff0d04f231cc8cd912a99982269dca0c41a68316
Time: 2018-03-14
Author: honnibal+gh@gmail.com
File Name: thinc/neural/_classes/batchnorm.py
Class Name: BatchNorm
Method Name: begin_update