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))