Skip to content
This repository has been archived by the owner on Jan 24, 2024. It is now read-only.

Fix SRL training #413

Merged
merged 2 commits into from
Sep 15, 2017
Merged

Conversation

reyoung
Copy link
Collaborator

@reyoung reyoung commented Sep 15, 2017

Fix #374

@@ -211,6 +214,7 @@ def event_handler(event):
output_layer=predict,
parameters=parameters,
input=test_data,
feeding=feeding,
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The bug is here. The feeding should be set.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see.

@@ -178,7 +181,7 @@ def event_handler(event):
print "Pass %d, Batch %d, Cost %f, %s" % (
event.pass_id, event.batch_id, event.cost, event.metrics)
if event.batch_id % 1000 == 0:
result = trainer.test(reader=reader, feeding=feeding)
result = trainer.test(reader=test_reader, feeding=feeding)
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is another bug but not related to issue.

train_reader and test_reader should be two instances because test will read all data in reader. If they are the same instance, training data will be reset every time.

Copy link
Contributor

@dzhwinter dzhwinter left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice catch!

@@ -211,6 +214,7 @@ def event_handler(event):
output_layer=predict,
parameters=parameters,
input=test_data,
feeding=feeding,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see.

@reyoung reyoung merged commit 09096f9 into PaddlePaddle:develop Sep 15, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants