forked from apache/mxnet
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[MXNET-1121] Example to demonstrate the inference workflow using RNN (a…
…pache#13680) * [MXNET-1121] Example to demonstrate the inference workflow using RNN * Addressed the review comments. Updated the ReadMe files. * Removed the unnecessary creation of NDArray * Added the unit tests to nightly tests to catch the failure. * Updated the makefiles and unit tests so that the examples are built and tested in nightly * Added the visual representation of the model and fixed the CI failure. * Added the missing pdf file. * Fixing the broken ci_test.sh * Update cpp-package/example/inference/README.md Co-Authored-By: leleamol <19983848+leleamol@users.noreply.github.com> * Update cpp-package/example/inference/README.md Co-Authored-By: leleamol <19983848+leleamol@users.noreply.github.com> * Update cpp-package/example/inference/README.md Co-Authored-By: leleamol <19983848+leleamol@users.noreply.github.com> * Update cpp-package/example/inference/README.md Co-Authored-By: leleamol <19983848+leleamol@users.noreply.github.com> * Update cpp-package/example/inference/README.md Co-Authored-By: leleamol <19983848+leleamol@users.noreply.github.com> * Update cpp-package/example/inference/simple_rnn.cpp Co-Authored-By: leleamol <19983848+leleamol@users.noreply.github.com> * Update cpp-package/example/inference/simple_rnn.cpp Co-Authored-By: leleamol <19983848+leleamol@users.noreply.github.com> * Update cpp-package/example/inference/simple_rnn.cpp Co-Authored-By: leleamol <19983848+leleamol@users.noreply.github.com> * Update cpp-package/example/inference/simple_rnn.cpp Co-Authored-By: leleamol <19983848+leleamol@users.noreply.github.com> * Update cpp-package/example/inference/simple_rnn.cpp Co-Authored-By: leleamol <19983848+leleamol@users.noreply.github.com> * Update cpp-package/example/inference/README.md Co-Authored-By: leleamol <19983848+leleamol@users.noreply.github.com> * Update cpp-package/example/inference/README.md Co-Authored-By: leleamol <19983848+leleamol@users.noreply.github.com> * Update cpp-package/example/inference/README.md Co-Authored-By: leleamol <19983848+leleamol@users.noreply.github.com> * Update cpp-package/example/inference/simple_rnn.cpp Co-Authored-By: leleamol <19983848+leleamol@users.noreply.github.com> * Update cpp-package/example/inference/simple_rnn.cpp Co-Authored-By: leleamol <19983848+leleamol@users.noreply.github.com> * Applying unresolved changes to README file. * Fixing the CI build failure. * Updated the RNN example from sequence generation to sentiment analysis * Updated the readme files. Updated the example to use trained model and updated the unit test. * Addressed the review comment to increase the default sequence length. Added the examples with inputs of various lengths. * Updated the example to handle variable length input. Updated the readme and unit test files accordingly. * Updated the example to share the memory between executors by createing shared executors. * Updated the creation of executors from largest to smallest bucket key * Creating the executor for the highest bucket key. * Updated the unit test to check for the results in a range and modified the function name to be consistent with others. * Fixed the logic to find the right bucket.
- Loading branch information
Showing
10 changed files
with
653 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
# Licensed to the Apache Software Foundation (ASF) under one | ||
# or more contributor license agreements. See the NOTICE file | ||
# distributed with this work for additional information | ||
# regarding copyright ownership. The ASF licenses this file | ||
# to you under the Apache License, Version 2.0 (the | ||
# "License"); you may not use this file except in compliance | ||
# with the License. You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, | ||
# software distributed under the License is distributed on an | ||
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
# KIND, either express or implied. See the License for the | ||
# specific language governing permissions and limitations | ||
# under the License. | ||
|
||
CPPEX_SRC = $(wildcard cpp-package/example/inference/*.cpp) | ||
CPPEX_EXE = $(patsubst cpp-package/example/inference/%.cpp, build/cpp-package/example/%, $(CPPEX_SRC)) | ||
|
||
CPPEX_CFLAGS += -Icpp-package/include | ||
CPPEX_EXTRA_LDFLAGS := -L$(ROOTDIR)/lib -lmxnet | ||
|
||
EXTRA_PACKAGES += cpp-package-inference-example-all | ||
EXTRA_PACKAGES_CLEAN += cpp-package-inference-example-clean | ||
|
||
.PHONY: cpp-package-inference-example-all cpp-package-inference-example-clean | ||
|
||
cpp-package-inference-example-all: cpp-package-all $(CPPEX_EXE) | ||
|
||
build/cpp-package/example/% : cpp-package/example/inference/%.cpp lib/libmxnet.so $(CPP_PACKAGE_OP_H_FILE) | ||
@mkdir -p $(@D) | ||
$(CXX) -std=c++11 $(CFLAGS) $(CPPEX_CFLAGS) -MM -MT cpp-package/example/inference/$* $< >build/cpp-package/example/$*.d | ||
$(CXX) -std=c++11 $(CFLAGS) $(CPPEX_CFLAGS) -o $@ $(filter %.cpp %.a, $^) $(LDFLAGS) $(CPPEX_EXTRA_LDFLAGS) | ||
|
||
cpp-package-inference-example-clean: | ||
rm -rf build/cpp-package/example/inference* | ||
|
||
-include build/cpp-package/example/inference/*.d |
Oops, something went wrong.