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

[MXNET-1083] Add the example to demonstrate the inference workflow using C++ API. #12930

Closed
wants to merge 130 commits into from

Conversation

leleamol
Copy link
Contributor

Description

The PR includes an example that demonstrates the inference workflow using C++ API.

Checklist

Essentials

Please feel free to remove inapplicable items for your PR.

  • [y] The PR title starts with [MXNET-$JIRA_ID], where $JIRA_ID refers to the relevant JIRA issue created (except PRs with tiny changes)
  • [y] Changes are complete (i.e. I finished coding on this PR)
  • [y] 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)
  • [y] 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 https://mxnet-ci-doc.s3-accelerate.dualstack.amazonaws.com/PR-$PR_ID/$BUILD_ID/index.html
  • To the my best knowledge, examples are either not affected by this change, or have been fixed to be compatible with this change

Changes

  • Feature1, tests, (and when applicable, API doc)
  • Feature2, tests, (and when applicable, API doc)
    The example demonstrates how to load the pre-trained model and associated parameter files.
    The model and parameter files can be specified as command line arguments.

Comments

  • If this change is a backward incompatible change, why must this change be made.
  • Interesting edge cases to note here

@roywei
Copy link
Member

roywei commented Oct 23, 2018

@leleamol Thanks for the contribution!
@mxnet-label-bot [pr-awaiting-review]

@marcoabreu marcoabreu added the pr-awaiting-review PR is waiting for code review label Oct 23, 2018
nswamy and others added 19 commits October 23, 2018 16:49
* use ResourceScope in Model/Trainer/FeedForward.scala

* add moveToOuterScope public method to move resources to a outerScope if it exists

* fix memory leak in FeedForward.scala by making it a native resource and disposing argparams, auxParams
in dispose() method
* Fix the operator API documentation

* update message
* nnz

* update err msg

* skip nnz test on gpu
…pache#12912)

1. Avoid raise exception when input is bytearray.
2. Avoid OpenCV crash for empty input.
3. Added unittests.
* update tree lstm example

* update README.md

* Update README.md
* Update the bilstm example to Gluon

* Update formating

* Update example/vae/VAE_example.ipynb

Co-Authored-By: ThomasDelteil <[email protected]>
* remove num_labels check in multibox_target

* add unit test

* test both cpu and gpu

* add contrib operator to GPU unit test

* do not test all contrib operator in gpu

* Fix the large int assign problem
* move mkldnn helper funcs to diff file

* create test file to test helper functions

* update comments in header

* move helpers into include dir

* fix lint

* update comment

* add stdlib headers

* remove unused headers

* add endif

* add missing header

* add inlines

* fix lint

* move copyfrom test to mkldnn_test
* Add mx.context.gpu_memory_info() to python api for flexible tests.

* Add test_gluon_gpu.py:test_large_models to show cudnnFind headroom issue.

* Output model sizes tried by test_gluon_gpu.py:test_large_models.

* Fix perl interface to MXGetGPUMemoryInformation.

* Increase difficulty of test_gluon_gpu.py:test_large_models.

* Forgot a file in fix for perl.

* Modify test to pass on no-cudnn CI runner.

* Mutex algo reg updates, serialize cudnnFind calls.

* Fix for cudnnFind memory headroom issue.

* Fix cpplint.

* Respond to reviewers comments.

* Guard against improper MXNET_GPU_MEM_LARGE_ALLOC_ROUND_SIZE values.

* Fix potentially unassigned var.
…2919)

* fix mac r install and windows python build from source docs

* reorder macos r install instructions
* enable bn unit tests

* travis timed out, trigger ci
I have made two minor contributions with pull requests so far. I forgot to add my name here earlier.
* missing line break fix for tutorials toc

* fix the install index toc errors
* COsine Embedding Loss function added

* Added unit tests for Cosine Embedding Loss Function

* Added Latex code for formula for cosine embedding loss

* Fixing document rendering

* Fixing documentation issue

* PR Comments addressed for using F (NDArray or Symbol) to calculate norm, renaming parameters

* Markdown file updated. Added entry for CosineEmbeddingLoss

* Added a line after .. math:: to fix documentation

* Documentation check - pylint fix

* Formula update

* Making the formula simpler for correct rendering incrementally - Update 1

* Making the formula simpler for correct rendering incrementally - Update 2

* Making the formula simpler for correct rendering incrementally - Update 3

* Making the formula simpler for correct rendering incrementally - Update 4

* Making the formula simpler for correct rendering incrementally - Update 5

* Trigger CI

*  making the utility function cosine similarity internal

* Added a test case for label = -1, for dissimilar vectors

* Refactored names of parameters to the loss functions and updated the formula in docstring

* PR comments addressed changes in documentation

* Added random input vectors and labelled tests

* Renaming variables

* Pylint issues fixed

* Resolving conflicts

* Pylint issues fixed

* Style issues fixed trailing whitespaces removed

* Review comment addressed, sample_weight added in the parameter

* Trigger CI

* Reordered Parameter description

* comments addressed - spelling errors

* nit comments addressed

* Trigger CI

* Trugger CI

* Trigger CI

* Trigger CI
eric-haibin-lin and others added 22 commits November 13, 2018 16:31
* Fix scaladoc errors from missing classpath

Remove duplicate scalastyle plugin

* Fix scaladoc warnings

Also enable and fix all feature and deprecation warnings
* use cached version of get thread max

* reserve core affects omp singleton

* omp_thread_max_ updated in one line

* remove enabled block

* add brackets

* re-add excluded reserved

* add missing var

* refactor macro
* adding unit test for MKLDNN FullyConnected operator

* removing mkldnn filter

* removing mkldnn filter
* fix.

* add test.

* retrigger
* Addressed doc issues

* Update optimizer.py
* fixing gradcam

* changed loading parameters code

* fixing type conversions issue with previous versions of matplotlib

* gradcam consolidation

* creating directory structures in utils

* changing location

* empty commit
* Adding info_gan example

* adjust paths of filenames

* Update index.md

* Update index.md

* Update index.md

* Update info_gan.md

Added an image

* Update info_gan.md

Applied some fixes

* Update info_gan.md

Applied some fixes

* Update info_gan.md

Applied some fixes

* Update info_gan.md

* Updated index.md file

* Updated index.md file

* change links

* Fixed typo

* Delete Untitled.ipynb

* Adding Vishaals comments

* Adding Anirudh's comments

* Fixed some bugs

* Adding Anirudh's comments

* some minor fixes
…only once. Removed the image_data instance member.
@leleamol
Copy link
Contributor Author

Opened a new PR #13294

@leleamol leleamol deleted the inception-inference branch December 19, 2018 00:45
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
pr-awaiting-review PR is waiting for code review
Projects
None yet
Development

Successfully merging this pull request may close these issues.