Commit 548becfd authored by 宋柯's avatar 宋柯

模型调试

parent acc7b49e
...@@ -30,7 +30,7 @@ for vocab_key in vocab_keys: ...@@ -30,7 +30,7 @@ for vocab_key in vocab_keys:
print('filename: ', filename) print('filename: ', filename)
with open(os.path.join(save_dir, filename), 'w') as f: with open(os.path.join(save_dir, filename), 'w') as f:
texts = conn.lrange(vocab_key, 0, -1) texts = conn.lrange(vocab_key, 0, -1)
texts = eval(texts[0]) texts = list(filter(lambda x: x != '', eval(texts[0])))
print('texts: ', len(texts)) print('texts: ', len(texts))
f.write('\n'.join(texts)) f.write('\n'.join(texts))
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment