6777017412dd6b572cc385958b605f07cf398601,neurite/tf/layers.py,MeanStream,call,#MeanStream#,1532

Before Change


        new_mean, new_count = _mean_update(self.mean, self.count, x, self.cap)
        
        // update op
        updates = [(self.count, new_count), (self.mean, new_mean)]
        self.add_update(updates, x)

        // prep for broadcasting :(
        p = tf.concat((K.reshape(this_bs_int, (1,)), K.shape(self.mean)), 0)

After Change


        
        // update op
        self.count.assign(new_count)
        self.mean.assign(new_mean)
        
        // the first few 1000 should not matter that much towards this cost
        return K.minimum(1., new_count/self.cap) * (z * K.expand_dims(new_mean, 0))
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 3

Instances


Project Name: adalca/neuron
Commit Name: 6777017412dd6b572cc385958b605f07cf398601
Time: 2020-09-11
Author: 46202852+neel-dey@users.noreply.github.com
File Name: neurite/tf/layers.py
Class Name: MeanStream
Method Name: call


Project Name: adalca/neuron
Commit Name: 6777017412dd6b572cc385958b605f07cf398601
Time: 2020-09-11
Author: 46202852+neel-dey@users.noreply.github.com
File Name: neurite/tf/layers.py
Class Name: CovStream
Method Name: call


Project Name: QUANTAXIS/QUANTAXIS
Commit Name: 5c34d497ab32ea731b687c5863f104615f666d06
Time: 2019-02-16
Author: yutiansut@qq.com
File Name: QUANTAXIS/QAFetch/QAQuery.py
Class Name:
Method Name: QA_fetch_index_min


Project Name: QUANTAXIS/QUANTAXIS
Commit Name: 5c34d497ab32ea731b687c5863f104615f666d06
Time: 2019-02-16
Author: yutiansut@qq.com
File Name: QUANTAXIS/QAFetch/QAQuery.py
Class Name:
Method Name: QA_fetch_index_day