fix for windows (thanks to chrothenbach)

This commit is contained in:
Jeff Wu
2019-03-07 11:26:58 -08:00
parent 79a246a58e
commit 86378284e1

View File

@ -12,6 +12,7 @@ model = sys.argv[1]
subdir = os.path.join('models', model) subdir = os.path.join('models', model)
if not os.path.exists(subdir): if not os.path.exists(subdir):
os.makedirs(subdir) os.makedirs(subdir)
subdir = subdir.replace('\\','/') # needed for Windows
for filename in ['checkpoint','encoder.json','hparams.json','model.ckpt.data-00000-of-00001', 'model.ckpt.index', 'model.ckpt.meta', 'vocab.bpe']: for filename in ['checkpoint','encoder.json','hparams.json','model.ckpt.data-00000-of-00001', 'model.ckpt.index', 'model.ckpt.meta', 'vocab.bpe']: