a849c17e46ea7188a7b6229c9f68417803e730ad,rl_coach/architectures/tensorflow_components/shared_variables.py,SharedRunningStats,push,#SharedRunningStats#Any#,76
Before Change
self.sess = sess
def push(self, x):
x = x.astype("float64")
self.sess.run([self._inc_sum, self._inc_sum_squared, self._inc_count],
feed_dict={
self.new_sum: x.sum(axis=0).ravel(),
self.new_sum_squared: np.square(x).sum(axis=0).ravel(),
self.newcount: np.array(len(x), dtype="float64")
})
if self._shape is None:
self._shape = x.shape
@property
After Change
def push(self, x):
if self.pubsub:
self.pubsub.redis_connection.publish(self.channel, pickle.dumps(x))
return
self.push_val(x)
def push_val(self, x):
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 7
Instances
Project Name: NervanaSystems/coach
Commit Name: a849c17e46ea7188a7b6229c9f68417803e730ad
Time: 2018-11-13
Author: balaji.warft@gmail.com
File Name: rl_coach/architectures/tensorflow_components/shared_variables.py
Class Name: SharedRunningStats
Method Name: push
Project Name: GPflow/GPflow
Commit Name: b84b7df8bf23aee3cb98b0390aa69f7ee31fe30a
Time: 2016-02-15
Author: james.hensman@gmail.com
File Name: GPflow/model.py
Class Name: GPModel
Method Name: predict_y
Project Name: GPflow/GPflow
Commit Name: b84b7df8bf23aee3cb98b0390aa69f7ee31fe30a
Time: 2016-02-15
Author: james.hensman@gmail.com
File Name: GPflow/model.py
Class Name: GPModel
Method Name: predict_f