Skip to content

Commit

Permalink
default to best model for eval
Browse files Browse the repository at this point in the history
  • Loading branch information
awni committed Mar 31, 2017
1 parent f8da31d commit 13f1875
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion entry/prepare-entry.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ done

## Copy model files
model_dir=$1
for f in 'config.json' 'loader.pkl' 'model.data-*' 'model.index'
for f in 'config.json' 'loader.pkl' 'best_model.epoch.data-*' 'best_model.epoch.index'
do
cp $model_dir/$f .
done
Expand Down
2 changes: 1 addition & 1 deletion evaler.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ def __init__(self, save_path, is_verbose, batch_size=1):
self.model.init_inference(config['model'])
tf.global_variables_initializer().run(session=sess)
saver = tf.train.Saver(tf.global_variables())
saver.restore(sess, os.path.join(save_path, "model"))
saver.restore(sess, os.path.join(save_path, "best_model.epoch"))

def probs(self, inputs):
model = self.model
Expand Down

0 comments on commit 13f1875

Please sign in to comment.