Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

training data was used to eval #157

Closed
hihell opened this issue Jun 16, 2020 · 3 comments
Closed

training data was used to eval #157

hihell opened this issue Jun 16, 2020 · 3 comments

Comments

@hihell
Copy link

hihell commented Jun 16, 2020

in train.py line 77
_, _eval_summaries = sess.run([eval_init_op, eval_summaries])
this line will execute eval_summaries with train data, do:

sess.run(eval_init_op)       
_eval_summaries = sess.run(eval_summaries)

instead

@hihell hihell changed the title you are using train data to eval training data was used to eval Jun 18, 2020
@bozhenhhu
Copy link

Thank you. For the same epoch and batchsize, when I use _, _eval_summaries = sess.run([eval_init_op, eval_summaries]) ,eval/1/ BLEU = 41.36, 69.4/47.9/34.7/25.4 (BP=1.000, ration=1.028), however, when I use sess.run(eval_init_op)
_eval_summaries = sess.run(eval_summaries), the eval BLEU = 0.52, 23.0/1.6/0.3/0.1 (BP=0.487, ration=0.582), I can not figure out this reason, why do you think the first one involves with train data?

@hihell
Copy link
Author

hihell commented Jul 5, 2020

sess.run will use one batch to run all the operations in the array, meaning you run [eval_init_op, eval_summaries] with one batch from training data. after sess.run finished, the dataset was switch to eval dataset

@hihell
Copy link
Author

hihell commented Jul 25, 2020

@bozhenhhu with further check of code, I think bleu score should not be affected by change above, bleu is calculated by 'hypothesis' which will run y_hat by eval data in either way

the train data will only eval eval_summaries

@hihell hihell closed this as completed Jul 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants