-
Notifications
You must be signed in to change notification settings - Fork 5.9k
Add ChunkEvaluator for Multi-batches #6515
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
Add ChunkEvaluator for Multi-batches #6515
Conversation
paddle/operators/chunk_eval_op.cc
Outdated
| AddOutput("F1-Score", | ||
| "(float). The evaluated F1-Score on the given mini-batch."); | ||
| AddOutput( | ||
| "NumInferChunks", |
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.
can NumInferChunks be different with NumLabelChunks?
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.
Yes, NumInferChunks can be different withNumLabelChunks since they indicate the number of chunks in inference data and labeled data respectively.
paddle/operators/chunk_eval_op.cc
Outdated
| "NumInferChunks", | ||
| "(int). The number of chunks in Inference on the given mini-batch."); | ||
| AddOutput("NumLabelChunks", | ||
| "(int). The number of chunks in Label on the given mini-batch."); |
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.
type is int64_t
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.
| precision_val = np.array(outs[1]) | ||
| recall_val = np.array(outs[2]) | ||
| f1_score_val = np.array(outs[3]) | ||
| precision_val = np.array(precision) |
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.
我看到evaluator.eval已经return的是np.array了,这里为啥还要加一层?
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. 参照图像分类示例中的输出,去掉了np.array.
… add-multiBatch-chunkEval
… add-multiBatch-chunkEval
… add-multiBatch-chunkEval-dev
jacquesqiao
left a comment
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.
LGTM!
resolve #6513