facebookresearch / SymbolicMathematics

Deep Learning for Symbolic Mathematics
Other
523 stars 114 forks source link

Why does the predict result copy the dataset's answer? #10

Open zqx1609 opened 4 years ago

zqx1609 commented 4 years ago

I'm trying to evaluate the model, and I use the beam evaluation. I find out that your answer in the third line is copied from the second line, which is the answer in dataset. Your code which copies the answer is here: beam_log = {} for i in range(len(len1)): src = idx_to_sp(env, x1[1:len1[i] - 1, i].tolist()) tgt = idx_to_sp(env, x2[1:len2[i] - 1, i].tolist()) if valid[i]: beam_log[i] = {'src': src, 'tgt': tgt, 'hyps': [(tgt, None, True)]} The 'hyps' should be the prediction by the model, but you use 'tgt' as the output. Why not give the prediction in the program? And can you give the code which can output the answer?