mirror of
https://github.com/gryf/coach.git
synced 2025-12-18 11:40:18 +01:00
use phase context in GraphManager.evaluate
This commit is contained in:
@@ -446,7 +446,7 @@ class GraphManager(object):
|
||||
self.verify_graph_was_created()
|
||||
|
||||
if steps.num_steps > 0:
|
||||
self.phase = RunPhase.TEST
|
||||
with self.phase_context(RunPhase.TEST):
|
||||
self.last_evaluation_start_time = time.time()
|
||||
|
||||
# reset all the levels before starting to evaluate
|
||||
@@ -458,8 +458,6 @@ class GraphManager(object):
|
||||
while self.total_steps_counters[self.phase][steps.__class__] < count_end:
|
||||
self.act(EnvironmentEpisodes(1), keep_networks_in_sync=keep_networks_in_sync)
|
||||
|
||||
self.phase = RunPhase.UNDEFINED
|
||||
|
||||
def restore_checkpoint(self):
|
||||
self.verify_graph_was_created()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user