Skip to content

Commit

Permalink
make checkpoint_dir if not exists. fix #3
Browse files Browse the repository at this point in the history
  • Loading branch information
carpedm20 committed Mar 23, 2016
1 parent 561ccb0 commit 2ea5436
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions main.py
@@ -1,3 +1,4 @@
import os
import pprint
import tensorflow as tf

Expand Down Expand Up @@ -30,6 +31,9 @@ def main(_):
count = []
word2idx = {}

if not os.path.exists(FLAGS.checkpoint_dir):
os.makedirs(FLAGS.checkpoint_dir)

train_data = read_data('%s/%s.train.txt' % (FLAGS.data_dir, FLAGS.data_name), count, word2idx)
valid_data = read_data('%s/%s.valid.txt' % (FLAGS.data_dir, FLAGS.data_name), count, word2idx)
test_data = read_data('%s/%s.test.txt' % (FLAGS.data_dir, FLAGS.data_name), count, word2idx)
Expand Down

0 comments on commit 2ea5436

Please sign in to comment.