diff --git a/c/tensorNet.cpp b/c/tensorNet.cpp index e2e19b3df..438a16291 100644 --- a/c/tensorNet.cpp +++ b/c/tensorNet.cpp @@ -612,7 +612,9 @@ bool tensorNet::ProfileModel(const std::string& deployFile, // name for caf nvinfer1::ITensor* tensor = blobNameToTensor->find(outputs[n].c_str()); if( !tensor ) + { LogError(LOG_TRT "failed to retrieve tensor for Output \"%s\"\n", outputs[n].c_str()); + } else { #if NV_TENSORRT_MAJOR >= 4 @@ -1136,9 +1138,13 @@ bool tensorNet::LoadNetwork( const char* prototxt_path_, const char* model_path_ loadedPlugins = initLibNvInferPlugins(&gLogger, ""); if( !loadedPlugins ) + { LogError(LOG_TRT "failed to load NVIDIA plugins\n"); + } else + { LogVerbose(LOG_TRT "completed loading NVIDIA plugins.\n"); + } } #endif diff --git a/examples/actionnet/actionnet.cpp b/examples/actionnet/actionnet.cpp index b5a42e5a7..3ee16003b 100644 --- a/examples/actionnet/actionnet.cpp +++ b/examples/actionnet/actionnet.cpp @@ -149,9 +149,13 @@ int main( int argc, char** argv ) const int class_id = net->Classify(image, input->GetWidth(), input->GetHeight(), &confidence); if( class_id >= 0 ) + { LogVerbose("actionnet: %2.5f%% class #%i (%s)\n", confidence * 100.0f, class_id, net->GetClassDesc(class_id)); + } else + { LogError("actionnet: failed to classify frame\n"); + } // overlay the results if( class_id >= 0 ) @@ -194,4 +198,3 @@ int main( int argc, char** argv ) LogVerbose("actionnet: shutdown complete.\n"); return 0; } -