Skip to content

Commit 752f5ef

Browse files
committed
fix composite model loading from log dir
1 parent 6aaa6ab commit 752f5ef

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/e2eflow/util.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,9 @@ def convert_input_strings(config_dct, dirs):
7777
for name in config_dct['finetune'].split(","):
7878
ckpt_dir = os.path.join(dirs['checkpoints'], name)
7979
ckpt = tf.train.get_checkpoint_state(ckpt_dir)
80+
if ckpt is None:
81+
ckpt_dir = os.path.join(dirs['log'], 'ex', name)
82+
ckpt = tf.train.get_checkpoint_state(ckpt_dir)
8083
assert ckpt, "Could not load experiment " + name
8184
finetune.append(ckpt)
8285
config_dct['finetune'] = finetune

0 commit comments

Comments
 (0)