\brief This function prints the help information for running this sample
| 804 | //! \brief This function prints the help information for running this sample |
| 805 | //! |
| 806 | void printHelpInfo() |
| 807 | { |
| 808 | std::cout << "Usage: ./sample_int8_api [-h or --help] [--model=model_file] " |
| 809 | "[--ranges=per_tensor_dynamic_range_file] [--image=image_file] [--reference=reference_file] " |
| 810 | "[--data=/path/to/data/dir] [--useDLACore=<int>] [-v or --verbose]\n"; |
| 811 | std::cout << "-h or --help. Display This help information" << std::endl; |
| 812 | std::cout << "--model=model_file.onnx or /absolute/path/to/model_file.onnx. Generate model file using README.md in " |
| 813 | "case it does not exists. Default to resnet50.onnx" |
| 814 | << std::endl; |
| 815 | std::cout << "--image=image.ppm or /absolute/path/to/image.ppm. Image to infer. Defaults to airlines.ppm" |
| 816 | << std::endl; |
| 817 | std::cout << "--reference=reference.txt or /absolute/path/to/reference.txt. Reference labels file. Defaults to " |
| 818 | "reference_labels.txt" |
| 819 | << std::endl; |
| 820 | std::cout << "--ranges=ranges.txt or /absolute/path/to/ranges.txt. Specify custom per-tensor dynamic range for the " |
| 821 | "network. Defaults to resnet50_per_tensor_dynamic_range.txt" |
| 822 | << std::endl; |
| 823 | std::cout << "--write_tensors. Option to generate file containing network tensors name. By default writes to " |
| 824 | "network_tensors.txt file. To provide user defined file name use additional option " |
| 825 | "--network_tensors_file. See --network_tensors_file option usage for more detail." |
| 826 | << std::endl; |
| 827 | std::cout << "--network_tensors_file=network_tensors.txt or /absolute/path/to/network_tensors.txt. This option " |
| 828 | "needs to be used with --write_tensors option. Specify file name (will write to current execution " |
| 829 | "directory) or absolute path to file name to write network tensor names file. Dynamic range " |
| 830 | "corresponding to each network tensor is required to run the sample. Defaults to network_tensors.txt" |
| 831 | << std::endl; |
| 832 | std::cout << "--data=/path/to/data/dir. Specify data directory to search for above files in case absolute paths to " |
| 833 | "files are not provided. Defaults to data/samples/int8_api/ or data/int8_api/" |
| 834 | << std::endl; |
| 835 | std::cout << "--useDLACore=N. Specify a DLA engine for layers that support DLA. Value can range from 0 to n-1, " |
| 836 | "where n is the number of DLA engines on the platform." |
| 837 | << std::endl; |
| 838 | std::cout << "--verbose. Outputs per-tensor dynamic range and layer precision info for the network" << std::endl; |
| 839 | } |
| 840 | |
| 841 | int main(int argc, char** argv) |
| 842 | { |