Skip to content

Commit

Permalink
fix: move the Tensorflow import in coach_launcher.py inside the _save…
Browse files Browse the repository at this point in the history
…_tf_model fn (#1652)

Co-authored-by: Akash Goel <[email protected]>
  • Loading branch information
goelakash and goel-akas authored Oct 23, 2020
1 parent da84be9 commit f00a5a6
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
import rl_coach.core_types
from rl_coach import logger
from rl_coach.logger import screen
import tensorflow as tf
import argparse
import copy
import logging
Expand Down Expand Up @@ -192,6 +191,7 @@ def _save_tf_model(self):
ckpt_dir = '/opt/ml/output/data/checkpoint'
model_dir = '/opt/ml/model'

import tensorflow as tf # importing tensorflow here so that MXNet docker image is compatible with this file.
# Re-Initialize from the checkpoint so that you will have the latest models up.
tf.train.init_from_checkpoint(ckpt_dir,
{'main_level/agent/online/network_0/': 'main_level/agent/online/network_0'})
Expand Down

0 comments on commit f00a5a6

Please sign in to comment.