You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mxnet.apache.org by GitBox <gi...@apache.org> on 2019/07/29 10:51:51 UTC

[GitHub] [incubator-mxnet] somone23412 opened a new pull request #15686: Fix the problem in printing feature in c++ API examples : feature_extract

somone23412 opened a new pull request #15686: Fix the problem in printing feature in c++ API examples : feature_extract
URL: https://github.com/apache/incubator-mxnet/pull/15686
 
 
   Fixed a run-time error caused by mismatch of output dimensions.
   
   ## Description ##
   
   The dimensions output with origin code and model is (2, 1024, 1, 1), which may lead to the following errors:
   
   ```bash
   terminate called after throwing an instance of 'dmlc::Error'
     what():  [10:34:56] /mnt/feature_extract/3rdparty/mxnet-cpp-package/include/mxnet-cpp/ndarray.hpp:379: Check failed: shape.size() == 2 (4 vs. 2) : The NDArray needs to be 2 dimensional.
   ```
   so we should reshape the output array to (2, 1024)
   
   ## Checklist ##
   ### Essentials ###
   Please feel free to remove inapplicable items for your PR.
   - [x] The PR title starts with [MXNET-$JIRA_ID], where $JIRA_ID refers to the relevant [JIRA issue](https://issues.apache.org/jira/projects/MXNET/issues) created (except PRs with tiny changes)
   - [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] Feature1, tests, (and when applicable, API doc)
   - [x] Feature2, tests, (and when applicable, API doc)
   
   ## Comments ##
   - If this change is a backward incompatible change, why must this change be made.
   - Interesting edge cases to note here
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services