\brief This function initializes members of the params struct using the command line args
| 775 | //! \brief This function initializes members of the params struct using the command line args |
| 776 | //! |
| 777 | SampleINT8APIParams initializeSampleParams(SampleINT8APIArgs args) |
| 778 | { |
| 779 | SampleINT8APIParams params; |
| 780 | if (args.dataDirs.empty()) // Use default directories if user hasn't provided directory paths |
| 781 | { |
| 782 | params.dataDirs.push_back("data/samples/int8_api/"); |
| 783 | params.dataDirs.push_back("data/int8_api/"); |
| 784 | } |
| 785 | else // Use the data directory provided by the user |
| 786 | { |
| 787 | params.dataDirs = args.dataDirs; |
| 788 | } |
| 789 | |
| 790 | params.dataDirs.push_back(""); // In case of absolute path search |
| 791 | params.verbose = args.verbose; |
| 792 | params.modelFileName = args.modelFileName; |
| 793 | params.imageFileName = args.imageFileName; |
| 794 | params.referenceFileName = args.referenceFileName; |
| 795 | params.dynamicRangeFileName = args.dynamicRangeFileName; |
| 796 | params.dlaCore = args.useDLACore; |
| 797 | params.writeNetworkTensors = args.writeNetworkTensors; |
| 798 | params.networkTensorsFileName = args.networkTensorsFileName; |
| 799 | validateInputParams(params); |
| 800 | return params; |
| 801 | } |
| 802 | |
| 803 | //! |
| 804 | //! \brief This function prints the help information for running this sample |
no test coverage detected