未验证 提交 220e22e6 编写于 作者: Z zhang wenhui 提交者: GitHub

Merge pull request #1524 from frankwhzhang/fix_bug

fix python3 xrange bug, gru4rec/tagspace
...@@ -78,6 +78,6 @@ if __name__ == "__main__": ...@@ -78,6 +78,6 @@ if __name__ == "__main__":
test_dir, "", batch_size=batch_size, test_dir, "", batch_size=batch_size,
buffer_size=1000, word_freq_threshold=0, is_train=False) buffer_size=1000, word_freq_threshold=0, is_train=False)
for epoch in xrange(start_index, last_index + 1): for epoch in range(start_index, last_index + 1):
epoch_path = model_dir + "/epoch_" + str(epoch) epoch_path = model_dir + "/epoch_" + str(epoch)
infer(test_reader=test_reader, use_cuda=use_cuda, model_path=epoch_path) infer(test_reader=test_reader, use_cuda=use_cuda, model_path=epoch_path)
...@@ -80,6 +80,6 @@ if __name__ == "__main__": ...@@ -80,6 +80,6 @@ if __name__ == "__main__":
test_dir, "", vocab_tag_path, batch_size=1, test_dir, "", vocab_tag_path, batch_size=1,
neg_size=0, buffer_size=1000, is_train=False) neg_size=0, buffer_size=1000, is_train=False)
for epoch in xrange(start_index, last_index + 1): for epoch in range(start_index, last_index + 1):
epoch_path = model_dir + "/epoch_" + str(epoch) epoch_path = model_dir + "/epoch_" + str(epoch)
infer(test_reader=test_reader, vocab_tag=vocab_tag, use_cuda=False, model_path=epoch_path) infer(test_reader=test_reader, vocab_tag=vocab_tag, use_cuda=False, model_path=epoch_path)
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册