Skip to content

Commit

Permalink
Merge pull request #1760 from andrejlevkovitch/fix-log-braces
Browse files Browse the repository at this point in the history
fix problem with braces and logging library
  • Loading branch information
dusty-nv authored Nov 30, 2023
2 parents aa91738 + 33e3c6e commit 35ed398
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
6 changes: 6 additions & 0 deletions c/tensorNet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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

Expand Down
5 changes: 4 additions & 1 deletion examples/actionnet/actionnet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 )
Expand Down Expand Up @@ -194,4 +198,3 @@ int main( int argc, char** argv )
LogVerbose("actionnet: shutdown complete.\n");
return 0;
}

0 comments on commit 35ed398

Please sign in to comment.