\brief Uses ONNX parser to create the ONNX Network and marks the output layers
| 207 | //! \brief Uses ONNX parser to create the ONNX Network and marks the output layers |
| 208 | //! |
| 209 | bool SampleNamedDimensions::constructNetwork(SampleUniquePtr<nvinfer1::IBuilder>& builder, |
| 210 | SampleUniquePtr<nvinfer1::INetworkDefinition>& network, SampleUniquePtr<nvinfer1::IBuilderConfig>& config, |
| 211 | SampleUniquePtr<nvonnxparser::IParser>& parser) |
| 212 | { |
| 213 | auto parsed = parser->parseFromFile(locateFile(mParams.onnxFileName, mParams.dataDirs).c_str(), |
| 214 | static_cast<int32_t>(sample::gLogger.getReportableSeverity())); |
| 215 | if (!parsed) |
| 216 | { |
| 217 | return false; |
| 218 | } |
| 219 | |
| 220 | return true; |
| 221 | } |
| 222 | |
| 223 | //! |
| 224 | //! \brief Adds an optimization profile for dynamic shapes |
nothing calls this directly
no test coverage detected