aaronmarkham commented on a change in pull request #12737: [MXNET-1017] Updating the readme file for cpp-package and adding readme file for example directory. URL: https://github.com/apache/incubator-mxnet/pull/12737#discussion_r223777257
########## File path: cpp-package/example/README.md ########## @@ -0,0 +1,112 @@ +# MXNet C++ Package Examples + +## Building C++ examples + +The examples are built while building the MXNet library and cpp-package from source . However, they can be built manually as follows + +From cpp-package/examples directory + +- Build all examples in release mode: **make all** +- Build all examples in debug mode: **make debug** + +By default, the examples are build to be run on GPU. To build examples to run on CPU: + +- Release: **make all MXNET\_USE\_CPU=1** +- Debug: **make debug MXNET\_USE\_CPU=1** + +The examples that are build to be run on GPU may not work on the non-GPU machines. +The makefile will also download the necessary data files and store in data folder. (The download will take couple of minutes, but will be done only once on a fresh installation.) + + +## Examples + +This directory contains following examples. In order to run the examples, ensure that the path to the MXNet shared library is added to the OS specific environment variable such as _LD\_LIBRARY\_PATH_ . + +### [alexnet.cpp](<https://github.com/apache/incubator-mxnet/blob/master/cpp-package/example/alexnet.cpp>) + +The example implements C++ version of AlexNet. The networks trains the MNIST data. The number of epochs can be specified as command line arguement. For example: + ``` + ./alexnet 10 + ``` + +### [charRNN.cpp](<https://github.com/apache/incubator-mxnet/blob/master/cpp-package/example/chaRNN.cpp>) + +The code implements C++ version charRNN for mxnet\example\rnn\char-rnn.ipynb with MXNet.cpp API. The generated params file is compatiable with python version. The train() and predict() has been verified with original data samples. + +The example expects arguments as follows: + +``` + ./charRNN train [BuildIn\ [TImeMajor] {corpus file} { batch size} { max epoch} [{starting epoch}] Review comment: Can you provide a real example? I'm thrown off by the backslash here. What's that for? TimeMajor - what's that? The spacing on the params is inconsistent. What's the difference with the [] and the {}? BuildIn has an opening [ but no closing ] ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected] With regards, Apache Git Services
