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

fix LinearRegressionOutput with empty label #15620

Merged
merged 1 commit into from
Jul 24, 2019

Conversation

haohuanw
Copy link
Contributor

Description

There is a behavior regression on LinearRegressionOutput after this CR: 3f3ba92#diff-726d19e2c39201681813130c8e2ac154

The previous CR changes the default TShape::ndim() to -1 instead of 0 but LinearRegressionOutput layer is not updated to handle new behavior of TShape.

Checklist

Essentials

Please feel free to remove inapplicable items for your PR.

  • [ x ] Changes are complete (i.e. I finished coding on this PR)
  • [ x ] All changes have test coverage:
  • Unit tests are added for small changes to verify correctness (e.g. adding a new operator)
  • Nightly tests are added for complicated/long-running ones (e.g. changing distributed kvstore)
  • Build tests will be added for build configuration changes (e.g. adding a new build option with NCCL)
  • [ x ] Code is well-documented:
  • For user-facing API changes, API doc string has been updated.
  • For new C++ functions in header files, their functionalities and arguments are documented.
  • For new examples, README.md is added to explain the what the example does, the source of the dataset, expected performance on test set and reference to the original paper if applicable
  • Check the API doc at http://mxnet-ci-doc.s3-accelerate.dualstack.amazonaws.com/PR-$PR_ID/$BUILD_ID/index.html
  • [ x ] To the my best knowledge, examples are either not affected by this change, or have been fixed to be compatible with this change

Changes

  • [ x ] cpp-package/examples/test_regress_label.cpp (test whether bind still works when regress_label is not provided to LinearRegressionOutput layer.)

@haohuanw
Copy link
Contributor Author

@KellenSunderland



int main() {
std::cout << "Running regress label test" << std::endl;
Copy link
Contributor

Choose a reason for hiding this comment

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

Could use

#include <dmlc/logging.h>
LOG(INFO) << "Running regress label test";

opReqMap,
std::map<std::string, mxnet::cpp::NDArray>());
} catch (const std::exception& e) {
std::cout << "Error while binding in mxnet: " << MXGetLastError() << std::endl;
Copy link
Contributor

Choose a reason for hiding this comment

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

Same as above (at error level).

@abhinavs95
Copy link
Contributor

@mxnet-label-bot add [operator, backend]

@marcoabreu marcoabreu added Backend Issues related to the backend of MXNet Operator labels Jul 23, 2019
@KellenSunderland KellenSunderland merged commit 0e0c7f3 into apache:master Jul 24, 2019
TaoLv pushed a commit to TaoLv/incubator-mxnet that referenced this pull request Aug 13, 2019
anirudhacharya pushed a commit to anirudhacharya/mxnet that referenced this pull request Aug 20, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Backend Issues related to the backend of MXNet Operator
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants