Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

Add evaluation_loss to the estimator base class. #16888

Merged
merged 8 commits into from
Nov 25, 2019
Merged

Conversation

liuzh47
Copy link
Contributor

@liuzh47 liuzh47 commented Nov 22, 2019

Description

[Bug_fix] Add evaluation loss member in estimator class. The purpose of add the evaluation loss is to decouple the training loss with the evaluation loss in the fit_batch() and evaluate_batch() methods. Please refer to the issue for further information: #16879

@liuzh47 liuzh47 requested a review from szha as a code owner November 22, 2019 07:14
Copy link
Contributor

@leezu leezu left a comment

Choose a reason for hiding this comment

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

Thank you! Please see comment below

python/mxnet/gluon/contrib/estimator/estimator.py Outdated Show resolved Hide resolved
@leezu
Copy link
Contributor

leezu commented Nov 25, 2019

Could you also add a test case to https://github.com/apache/incubator-mxnet/blob/master/tests/python/unittest/test_gluon_estimator.py to prevent future regressions of this feature

@@ -59,6 +59,8 @@ class Estimator(object):
Trainer to apply optimizer on network parameters.
context : Context or list of Context
Device(s) to run the training on.
evaluation_loss: gluon.loss.loss
Loss (objective) function to calculate during evaluation.
Copy link
Contributor

Choose a reason for hiding this comment

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

It's not clear that evaluation_loss will use loss if it is None. Could you improve the description here?

@leezu leezu added the R1.6.0 label Nov 25, 2019
@ptrendx ptrendx merged commit 6bff547 into apache:master Nov 25, 2019
ptrendx pushed a commit to ptrendx/mxnet that referenced this pull request Nov 25, 2019
* Add evaluation_loss to the estimator base class.

* Update the base estimator class to support the separate evaluation loss.

* Add evaluation loss to the base estimator class.

* Add unittest for evaluation loss in the test_evaluation function

* Update estimator.py

* Update estimator.py
ptrendx added a commit that referenced this pull request Nov 26, 2019
* refactor and reduce float types for some functions, also add bitwise_xor (#16827)

* Mixed precison binary op backward (use in) for numpy (#16791)

* mixed precison binary op backward

* reduce unix cpu runtime

* Add evaluation_loss to the estimator base class. (#16888)

* Add evaluation_loss to the estimator base class.

* Update the base estimator class to support the separate evaluation loss.

* Add evaluation loss to the base estimator class.

* Add unittest for evaluation loss in the test_evaluation function

* Update estimator.py

* Update estimator.py
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants