-
Notifications
You must be signed in to change notification settings - Fork 5.9k
update the SRL demo. #2178
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
update the SRL demo. #2178
Conversation
|
| import paddle.v2 as paddle | ||
|
|
||
| logger = logging.getLogger('paddle') | ||
| logger.setLevel(logging.WARN) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
下面的print是不是也可以统一用logger?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done.
| result = trainer.test(reader=reader, feeding=feeding) | ||
| print "\nTest with Pass %d, %s" % (event.pass_id, result.metrics) | ||
|
|
||
| if not is_predict: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if else分支,建议改成两个函数train和infer。trainer = paddle.trainer.SGD 和 reader等也不属于infer分支~
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done.
fix #1788. fix #2080.