\brief Initializes members of the params struct using the command line args
| 591 | //! \brief Initializes members of the params struct using the command line args |
| 592 | //! |
| 593 | samplesCommon::OnnxSampleParams initializeSampleParams(samplesCommon::Args const& args) |
| 594 | { |
| 595 | samplesCommon::OnnxSampleParams params; |
| 596 | if (args.dataDirs.empty()) // Use default directories if user hasn't provided directory paths |
| 597 | { |
| 598 | params.dataDirs.push_back("data/mnist/"); |
| 599 | params.dataDirs.push_back("data/samples/mnist/"); |
| 600 | } |
| 601 | else // Use the data directory provided by the user |
| 602 | { |
| 603 | params.dataDirs = args.dataDirs; |
| 604 | } |
| 605 | params.onnxFileName = "mnist.onnx"; |
| 606 | params.dlaCore = args.useDLACore; |
| 607 | |
| 608 | return params; |
| 609 | } |
| 610 | //! |
| 611 | //! \brief Prints the help information for running this sample |
| 612 | //! |