Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
tensorflow-feed-from-gpu
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Elphel
tensorflow-feed-from-gpu
Commits
d8533f78
Commit
d8533f78
authored
Jan 16, 2020
by
Oleg Dzhimiev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
debug-printing
parent
1873e403
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
0 deletions
+12
-0
inference_base.cpp
inference_base.cpp
+4
-0
inference_base.h
inference_base.h
+2
-0
inference_tf.cpp
inference_tf.cpp
+6
-0
No files found.
inference_base.cpp
View file @
d8533f78
...
...
@@ -46,9 +46,12 @@ int InferenceBase::Init(string videoStream)
if
(
ReadClassLabels
()
!=
0
)
{
LOG
(
ERROR
)
<<
"ReadClassLabels returned non-zero
\n
"
;
return
-
1
;
}
LOG
(
INFO
)
<<
"CUDA INIT DONE
\n
"
;
/*
if (ReadGraph() != 0)
{
...
...
@@ -72,6 +75,7 @@ int InferenceBase::Init(string videoStream)
*/
isInitialized
=
true
;
return
0
;
}
...
...
inference_base.h
View file @
d8533f78
...
...
@@ -42,6 +42,8 @@ class InferenceBase
,
thresholdIOU
(
threshIOU
)
,
isInitialized
(
false
)
,
labelsMap
()
,
width
(
1280
)
,
height
(
720
)
,
debug
(
dbg
)
{}
virtual
~
InferenceBase
()
{}
...
...
inference_tf.cpp
View file @
d8533f78
...
...
@@ -25,9 +25,13 @@ int InferenceTensorflow::Init(string videoStream)
{
if
(
InferenceBase
::
Init
(
videoStream
)
!=
0
)
{
LOG
(
INFO
)
<<
"Init(videostream) exit non-zero (aka huge fail)"
;
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
opts
.
add_feed
(
inputLayer
);
for
(
auto
const
&
value
:
outputLayer
)
...
...
@@ -45,6 +49,8 @@ int InferenceTensorflow::Init(string videoStream)
LOG
(
ERROR
)
<<
"Failed to make callable"
;
}
LOG
(
INFO
)
<<
"Shape of the GPU tensor: (1, "
<<
height
<<
", "
<<
width
<<
", 3)
\n
"
;
// allocate tensor on the GPU
tensorflow
::
TensorShape
shape
=
tensorflow
::
TensorShape
({
1
,
height
,
width
,
3
});
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment