Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix problem with braces and logging library #1760

Merged
merged 2 commits into from
Nov 30, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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;
}