Esempio n. 1
0
 def testInvalid(self, schedule_timesteps, initial_p, final_p, step, expected):
   with self.assertRaises(ValueError):
     schedule = schedules.LinearSchedule(
         schedule_timesteps, initial_p, final_p)
     schedule.value(step)
Esempio n. 2
0
 def testLinear(self, schedule_timesteps, initial_p, final_p, step, expected):
   schedule = schedules.LinearSchedule(schedule_timesteps, initial_p, final_p)
   self.assertEqual(schedule.value(step), expected)