Commit d8533f78 authored by Oleg Dzhimiev's avatar Oleg Dzhimiev

debug-printing

parent 1873e403
...@@ -46,9 +46,12 @@ int InferenceBase::Init(string videoStream) ...@@ -46,9 +46,12 @@ int InferenceBase::Init(string videoStream)
if (ReadClassLabels() != 0) if (ReadClassLabels() != 0)
{ {
LOG(ERROR) << "ReadClassLabels returned non-zero\n";
return -1; return -1;
} }
LOG(INFO) << "CUDA INIT DONE\n";
/* /*
if (ReadGraph() != 0) if (ReadGraph() != 0)
{ {
...@@ -72,6 +75,7 @@ int InferenceBase::Init(string videoStream) ...@@ -72,6 +75,7 @@ int InferenceBase::Init(string videoStream)
*/ */
isInitialized = true; isInitialized = true;
return 0; return 0;
} }
......
...@@ -42,6 +42,8 @@ class InferenceBase ...@@ -42,6 +42,8 @@ class InferenceBase
, thresholdIOU(threshIOU) , thresholdIOU(threshIOU)
, isInitialized(false) , isInitialized(false)
, labelsMap() , labelsMap()
, width(1280)
, height(720)
, debug(dbg) , debug(dbg)
{} {}
virtual ~InferenceBase() {} virtual ~InferenceBase() {}
......
...@@ -25,9 +25,13 @@ int InferenceTensorflow::Init(string videoStream) ...@@ -25,9 +25,13 @@ int InferenceTensorflow::Init(string videoStream)
{ {
if (InferenceBase::Init(videoStream) != 0) if (InferenceBase::Init(videoStream) != 0)
{ {
LOG(INFO) << "Init(videostream) exit non-zero (aka huge fail)";
return -1; return -1;
} }
LOG(INFO) << "Init(videostream): PASS\n";
LOG(INFO) << "The session must exist at this point, see loadGraph() in inference_base.cpp";
// configure callable options // configure callable options
opts.add_feed(inputLayer); opts.add_feed(inputLayer);
for (auto const &value : outputLayer) for (auto const &value : outputLayer)
...@@ -45,6 +49,8 @@ int InferenceTensorflow::Init(string videoStream) ...@@ -45,6 +49,8 @@ int InferenceTensorflow::Init(string videoStream)
LOG(ERROR) << "Failed to make callable"; LOG(ERROR) << "Failed to make callable";
} }
LOG(INFO) << "Shape of the GPU tensor: (1, " << height << ", " << width << ", 3)\n";
// allocate tensor on the GPU // allocate tensor on the GPU
tensorflow::TensorShape shape = tensorflow::TensorShape({1, height, width, 3}); tensorflow::TensorShape shape = tensorflow::TensorShape({1, height, width, 3});
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment