aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--docs/00_introduction.dox27
-rw-r--r--examples/graph_alexnet.cpp2
-rw-r--r--examples/graph_googlenet.cpp2
-rw-r--r--examples/graph_inception_v3.cpp2
-rw-r--r--examples/graph_inception_v4.cpp2
-rw-r--r--examples/graph_lenet.cpp4
-rw-r--r--examples/graph_mobilenet.cpp2
-rw-r--r--examples/graph_resnet50.cpp2
-rw-r--r--examples/graph_resnext50.cpp2
-rw-r--r--examples/graph_squeezenet.cpp2
-rw-r--r--examples/graph_squeezenet_v1_1.cpp2
-rw-r--r--examples/graph_vgg16.cpp2
-rw-r--r--examples/graph_vgg19.cpp2
-rw-r--r--utils/CommonGraphOptions.h52
14 files changed, 82 insertions, 23 deletions
diff --git a/docs/00_introduction.dox b/docs/00_introduction.dox
index 4afd6d85f4..e12c739f99 100644
--- a/docs/00_introduction.dox
+++ b/docs/00_introduction.dox
@@ -831,21 +831,14 @@ or
LD_LIBRARY_PATH=build ./cl_convolution
-@note Examples accept different types of arguments, to find out what they are run the example without any argument and the help will be displayed at the beginning of the run.
+@note Examples accept different types of arguments, to find out what they are run the example with \a --help as an argument. If no arguments are specified then random values will be used to execute the graph.
For example:
- LD_LIBRARY_PATH=. ./graph_lenet
+ LD_LIBRARY_PATH=. ./graph_lenet --help
- ./graph_lenet
-
- Usage: ./graph_lenet [target] [path_to_data] [batches]
-
- No data folder provided: using random values
-
- Test passed
-
-In this case the first argument of LeNet (like all the graph examples) is the target (i.e 0 to run on NEON, 1 to run on OpenCL if available, 2 to run on OpenCL using the CLTuner), the second argument is the path to the folder containing the npy files for the weights and finally the third argument is the number of batches to run.
+Below is a list of the common parameters among the graph examples :
+@snippet utils/CommonGraphOptions.h Common graph examples parameters
@subsection S3_3_android Building for Android
@@ -951,18 +944,10 @@ And finally to run the example:
adb shell /data/local/tmp/cl_convolution_aarch64
adb shell /data/local/tmp/gc_absdiff_aarch64
-@note Examples accept different types of arguments, to find out what they are run the example without any argument and the help will be displayed at the beginning of the run.
+@note Examples accept different types of arguments, to find out what they are run the example with \a --help as an argument. If no arguments are specified then random values will be used to execute the graph.
For example:
- adb shell /data/local/tmp/graph_lenet
-
- /data/local/tmp/graph_lenet
-
- Usage: /data/local/tmp/graph_lenet [target] [path_to_data] [batches]
-
- No data folder provided: using random values
-
- Test passed
+ adb shell /data/local/tmp/graph_lenet --help
In this case the first argument of LeNet (like all the graph examples) is the target (i.e 0 to run on NEON, 1 to run on OpenCL if available, 2 to run on OpenCL using the CLTuner), the second argument is the path to the folder containing the npy files for the weights and finally the third argument is the number of batches to run.
diff --git a/examples/graph_alexnet.cpp b/examples/graph_alexnet.cpp
index e4bc2da571..63e7b16128 100644
--- a/examples/graph_alexnet.cpp
+++ b/examples/graph_alexnet.cpp
@@ -170,6 +170,8 @@ private:
/** Main program for AlexNet
*
+ * @note To list all the possible arguments execute the binary appended with the --help option
+ *
* @param[in] argc Number of arguments
* @param[in] argv Arguments
*
diff --git a/examples/graph_googlenet.cpp b/examples/graph_googlenet.cpp
index f9cb9787f1..4497dbd470 100644
--- a/examples/graph_googlenet.cpp
+++ b/examples/graph_googlenet.cpp
@@ -197,6 +197,8 @@ private:
/** Main program for Googlenet
*
+ * @note To list all the possible arguments execute the binary appended with the --help option
+ *
* @param[in] argc Number of arguments
* @param[in] argv Arguments
*/
diff --git a/examples/graph_inception_v3.cpp b/examples/graph_inception_v3.cpp
index 6262193b02..67f4e3cacf 100644
--- a/examples/graph_inception_v3.cpp
+++ b/examples/graph_inception_v3.cpp
@@ -845,6 +845,8 @@ private:
/** Main program for Inception V3
*
+ * @note To list all the possible arguments execute the binary appended with the --help option
+ *
* @param[in] argc Number of arguments
* @param[in] argv Arguments
*/
diff --git a/examples/graph_inception_v4.cpp b/examples/graph_inception_v4.cpp
index def73dff7a..4e405923fc 100644
--- a/examples/graph_inception_v4.cpp
+++ b/examples/graph_inception_v4.cpp
@@ -719,6 +719,8 @@ private:
/** Main program for Inception V4
*
+ * @note To list all the possible arguments execute the binary appended with the --help option
+ *
* @param[in] argc Number of arguments
* @param[in] argv Arguments
*/
diff --git a/examples/graph_lenet.cpp b/examples/graph_lenet.cpp
index c02e2f9ec0..0d8a943737 100644
--- a/examples/graph_lenet.cpp
+++ b/examples/graph_lenet.cpp
@@ -126,8 +126,10 @@ private:
/** Main program for LeNet
*
+ * @note To list all the possible arguments execute the binary appended with the --help option
+ *
* @param[in] argc Number of arguments
- * @param[in] argv Arguments ( [optional] Target (0 = NEON, 1 = OpenCL, 2 = OpenCL with Tuner), [optional] Path to the weights folder, [optional] batches, [optional] Fast math for convolution layer (0 = DISABLED, 1 = ENABLED) )
+ * @param[in] argv Arguments
*/
int main(int argc, char **argv)
{
diff --git a/examples/graph_mobilenet.cpp b/examples/graph_mobilenet.cpp
index 395936b8f7..b30f4c5fd3 100644
--- a/examples/graph_mobilenet.cpp
+++ b/examples/graph_mobilenet.cpp
@@ -339,6 +339,8 @@ private:
/** Main program for MobileNetV1
*
+ * @note To list all the possible arguments execute the binary appended with the --help option
+ *
* @param[in] argc Number of arguments
* @param[in] argv Arguments
*/
diff --git a/examples/graph_resnet50.cpp b/examples/graph_resnet50.cpp
index 2970037768..58f36f6ae4 100644
--- a/examples/graph_resnet50.cpp
+++ b/examples/graph_resnet50.cpp
@@ -232,6 +232,8 @@ private:
/** Main program for ResNet50
*
+ * @note To list all the possible arguments execute the binary appended with the --help option
+ *
* @param[in] argc Number of arguments
* @param[in] argv Arguments
*/
diff --git a/examples/graph_resnext50.cpp b/examples/graph_resnext50.cpp
index a02e406acb..c0e9b9f22a 100644
--- a/examples/graph_resnext50.cpp
+++ b/examples/graph_resnext50.cpp
@@ -183,6 +183,8 @@ private:
/** Main program for ResNeXt50
*
+ * @note To list all the possible arguments execute the binary appended with the --help option
+ *
* @param[in] argc Number of arguments
* @param[in] argv Arguments
*/
diff --git a/examples/graph_squeezenet.cpp b/examples/graph_squeezenet.cpp
index 9751539af6..9439ab4343 100644
--- a/examples/graph_squeezenet.cpp
+++ b/examples/graph_squeezenet.cpp
@@ -199,6 +199,8 @@ private:
/** Main program for Squeezenet v1.0
*
+ * @note To list all the possible arguments execute the binary appended with the --help option
+ *
* @param[in] argc Number of arguments
* @param[in] argv Arguments
*/
diff --git a/examples/graph_squeezenet_v1_1.cpp b/examples/graph_squeezenet_v1_1.cpp
index be0c326f2a..ba7ee774a7 100644
--- a/examples/graph_squeezenet_v1_1.cpp
+++ b/examples/graph_squeezenet_v1_1.cpp
@@ -201,6 +201,8 @@ private:
/** Main program for Squeezenet v1.1
*
+ * @note To list all the possible arguments execute the binary appended with the --help option
+ *
* @param[in] argc Number of arguments
* @param[in] argv Arguments
*/
diff --git a/examples/graph_vgg16.cpp b/examples/graph_vgg16.cpp
index 8ce1221ead..e677650d04 100644
--- a/examples/graph_vgg16.cpp
+++ b/examples/graph_vgg16.cpp
@@ -234,6 +234,8 @@ private:
/** Main program for VGG16
*
+ * @note To list all the possible arguments execute the binary appended with the --help option
+ *
* @param[in] argc Number of arguments
* @param[in] argv Arguments
*/
diff --git a/examples/graph_vgg19.cpp b/examples/graph_vgg19.cpp
index dcde4a2a65..c7fc333e0a 100644
--- a/examples/graph_vgg19.cpp
+++ b/examples/graph_vgg19.cpp
@@ -246,6 +246,8 @@ private:
/** Main program for VGG19
*
+ * @note To list all the possible arguments execute the binary appended with the --help option
+ *
* @param[in] argc Number of arguments
* @param[in] argv Arguments
*/
diff --git a/utils/CommonGraphOptions.h b/utils/CommonGraphOptions.h
index 24c8dbb67c..ce4a2c9dd1 100644
--- a/utils/CommonGraphOptions.h
+++ b/utils/CommonGraphOptions.h
@@ -34,6 +34,56 @@ namespace arm_compute
{
namespace utils
{
+/* ![Common graph examples parameters] */
+/* Common graph parameters
+ *
+ * --help : Print the example's help message.
+ * --threads : The number of threads to be used by the example during execution.
+ * --target : Execution target to be used by the examples. Supported target options: NEON, CL, GC.
+ * --type : Data type to be used by the examples. Supported data type options: QASYMM8, F16, F32.
+ * --layout : Data layout to be used by the examples. Supported data layout options : NCHW, NHWC.
+ * --enable-tuner : Toggle option to enable the OpenCL dynamic tuner.
+ * --fast-math : Toggle option to enable the fast math option.
+ * --data : Path that contains the trainable parameter files of graph layers.
+ * --image : Image to load and operate on. Image types supported: PPM, JPEG, NPY.
+ * --labels : File that contains the labels that classify upon.
+ * --validation-file : File that contains a list of image names with their corresponding label id (e.g. image0.jpg 5).
+ * This is used to run the graph over a number of images and report top-1 and top-5 metrics.
+ * --validation-path : The path where the validation images specified in the validation file reside.
+ * --validation-range : The range of the images to validate from the validation file (e.g 0,9).
+ * If not specified all the images will be validated.
+ * --tuner-file : The file to store the OpenCL dynamic tuner tuned parameters.
+ *
+ * Note that data, image and labels options should be provided to perform an inference run on an image.
+ * Note that validation-file and validation-path should be provided to perform a graph accuracy estimation.
+ * Note GLES target is not supported for most of the networks.
+ *
+ * Example execution commands:
+ *
+ * Execute a single inference given an image and a file containing the correspondence between label ids and human readable labels:
+ * ./graph_vgg16 --data=data/ --target=cl --layout=nhwc --image=kart.jpeg --labels=imagenet1000_clsid_to_human.txt
+ *
+ * Perform a graph validation on a list of images:
+ * ./graph_vgg16 --data=data/ --target=neon --threads=4 --layout=nchw --validation-file=val.txt --validation-path=ilsvrc_test_images/
+ *
+ * File formats:
+ *
+ * Validation file should be a plain file containing the names of the images followed by the correct label id.
+ * For example:
+ *
+ * image0.jpeg 882
+ * image1.jpeg 34
+ * image2.jpeg 354
+ *
+ * Labels file should be a plain file where each line is the respective human readable label (counting starts from 0).
+ * For example:
+ *
+ * 0: label0_name label0_name
+ * 1: label1_name or label1_name
+ * 2: label2_name label2_name
+ */
+/* ![Common graph examples parameters] */
+
/** Structure holding all the common graph parameters */
struct CommonGraphParams
{
@@ -111,7 +161,7 @@ public:
*
* @param[in] options Options to consume
*
- * @return Structure containing the commnon graph parameters
+ * @return Structure containing the common graph parameters
*/
CommonGraphParams consume_common_graph_parameters(CommonGraphOptions &options);
} // namespace utils