MCPcopy Create free account
hub / github.com/NVIDIA/TensorRT / initializeSampleParams

Function initializeSampleParams

samples/sampleIOFormats/sampleIOFormats.cpp:593–609  ·  view source on GitHub ↗

\brief Initializes members of the params struct using the command line args

Source from the content-addressed store, hash-verified

591//! \brief Initializes members of the params struct using the command line args
592//!
593samplesCommon::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//!

Callers 1

mainFunction · 0.70

Calls 1

emptyMethod · 0.45

Tested by

no test coverage detected