Skip to content
This repository was archived by the owner on Oct 31, 2023. It is now read-only.
This repository was archived by the owner on Oct 31, 2023. It is now read-only.

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

@zqx1609

Description

@zqx1609

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions