Commit 1cd8367b authored by szr712's avatar szr712

修改为top10

parent 6b8a8e1a
......@@ -35,7 +35,7 @@ def get_result(src, model, SRC, TRG, opt):
output = F.softmax(output, dim=-1)
if opt.tone_filter == True:
vals, indices = output.topk(k=5, dim=-1, largest=True, sorted=True)
vals, indices = output.topk(k=10, dim=-1, largest=True, sorted=True)
result = []
for x, index in enumerate(src[0][:]):
if SRC.vocab.itos[index] in opt.yunmus and SRC.vocab.itos[index][-1] != "0":
......
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