Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
seminar-breakout
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Shashank Suhas
seminar-breakout
Commits
7db397d7
You need to sign in or sign up before continuing.
Commit
7db397d7
authored
Feb 25, 2017
by
Yuxin Wu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
refactor inference runners
parent
3bc0bed2
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
102 additions
and
91 deletions
+102
-91
tensorpack/callbacks/inference_runner.py
tensorpack/callbacks/inference_runner.py
+95
-86
tensorpack/models/model_desc.py
tensorpack/models/model_desc.py
+6
-5
tensorpack/train/input_data.py
tensorpack/train/input_data.py
+1
-0
No files found.
tensorpack/callbacks/inference_runner.py
View file @
7db397d7
This diff is collapsed.
Click to expand it.
tensorpack/models/model_desc.py
View file @
7db397d7
...
@@ -80,11 +80,12 @@ class ModelDesc(object):
...
@@ -80,11 +80,12 @@ class ModelDesc(object):
for
v
in
input_vars
:
for
v
in
input_vars
:
tf
.
add_to_collection
(
INPUTS_KEY
,
v
.
dumps
())
tf
.
add_to_collection
(
INPUTS_KEY
,
v
.
dumps
())
ret
=
[]
ret
=
[]
for
v
in
input_vars
:
with
tf
.
name_scope
(
None
):
# clear any name scope it might get called in
placehdr_f
=
tf
.
placeholder
if
not
v
.
sparse
else
tf
.
sparse_placeholder
for
v
in
input_vars
:
ret
.
append
(
placehdr_f
(
placehdr_f
=
tf
.
placeholder
if
not
v
.
sparse
else
tf
.
sparse_placeholder
v
.
type
,
shape
=
v
.
shape
,
ret
.
append
(
placehdr_f
(
name
=
prefix
+
v
.
name
))
v
.
type
,
shape
=
v
.
shape
,
name
=
prefix
+
v
.
name
))
return
ret
return
ret
def
get_inputs_desc
(
self
):
def
get_inputs_desc
(
self
):
...
...
tensorpack/train/input_data.py
View file @
7db397d7
...
@@ -85,6 +85,7 @@ class FeedfreeInput(InputData):
...
@@ -85,6 +85,7 @@ class FeedfreeInput(InputData):
pass
pass
# TODO enqueu_many? https://github.com/tensorflow/tensorflow/issues/7817#issuecomment-282053155
class
EnqueueThread
(
ShareSessionThread
):
class
EnqueueThread
(
ShareSessionThread
):
def
__init__
(
self
,
queue
,
ds
,
input_placehdrs
):
def
__init__
(
self
,
queue
,
ds
,
input_placehdrs
):
super
(
EnqueueThread
,
self
)
.
__init__
()
super
(
EnqueueThread
,
self
)
.
__init__
()
...
...
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