예제 #1
0
 def testAverageVariablesNoNumUpdates_Scalar(self):
   with self.cached_session():
     ema = moving_averages.ExponentialMovingAverage(0.25)
     self._CheckDecay(ema, actual_decay=0.25, dim=1)
예제 #2
0
 def testAverageVariablesNumUpdates_Vector_Debias(self):
     # With num_updates 1, the decay applied is 0.1818
     ema = moving_averages.ExponentialMovingAverage(0.25,
                                                    num_updates=1,
                                                    zero_debias=True)
     self._CheckDecay(ema, actual_decay=0.181818, dim=5)
예제 #3
0
 def testAverageVariablesNumUpdates_Scalar(self):
     # With num_updates 1, the decay applied is 0.1818
     ema = moving_averages.ExponentialMovingAverage(0.25, num_updates=1)
     self._CheckDecay(ema, actual_decay=0.181818, dim=1)
예제 #4
0
 def testAverageVariablesNoNumUpdates_Vector_Debias(self):
     ema = moving_averages.ExponentialMovingAverage(0.25, zero_debias=True)
     self._CheckDecay(ema, actual_decay=0.25, dim=5)
예제 #5
0
 def testAverageVariablesNoNumUpdates_Scalar_Debias(self):
     with self.test_session():
         ema = moving_averages.ExponentialMovingAverage(0.25,
                                                        zero_debias=True)
         self._CheckDecay(ema, actual_decay=0.25, dim=1)
예제 #6
0
 def testAverageVariablesNumUpdates_Vector(self):
   with self.cached_session():
     # With num_updates 1, the decay applied is 0.1818
     ema = moving_averages.ExponentialMovingAverage(0.25, num_updates=1)
     self._CheckDecay(ema, actual_decay=0.181818, dim=5)