\brief Populates input and output mapping of the network
| 160 | //! \brief Populates input and output mapping of the network |
| 161 | //! |
| 162 | void SampleINT8API::getInputOutputNames() |
| 163 | { |
| 164 | int nbindings = mEngine.get()->getNbBindings(); |
| 165 | ASSERT(nbindings == 2); |
| 166 | for (int b = 0; b < nbindings; ++b) |
| 167 | { |
| 168 | nvinfer1::Dims dims = mEngine.get()->getBindingDimensions(b); |
| 169 | if (mEngine.get()->bindingIsInput(b)) |
| 170 | { |
| 171 | if (mParams.verbose) |
| 172 | { |
| 173 | sample::gLogInfo << "Found input: " << mEngine.get()->getBindingName(b) << " shape=" << dims |
| 174 | << " dtype=" << (int) mEngine.get()->getBindingDataType(b) << std::endl; |
| 175 | } |
| 176 | mInOut["input"] = mEngine.get()->getBindingName(b); |
| 177 | } |
| 178 | else |
| 179 | { |
| 180 | if (mParams.verbose) |
| 181 | { |
| 182 | sample::gLogInfo << "Found output: " << mEngine.get()->getBindingName(b) << " shape=" << dims |
| 183 | << " dtype=" << (int) mEngine.get()->getBindingDataType(b) << std::endl; |
| 184 | } |
| 185 | mInOut["output"] = mEngine.get()->getBindingName(b); |
| 186 | } |
| 187 | } |
| 188 | } |
| 189 | |
| 190 | //! |
| 191 | //! \brief Populate per-tensor dyanamic range values |
nothing calls this directly
no test coverage detected