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
6221d17d
Commit
6221d17d
authored
Nov 17, 2016
by
Yuxin Wu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
allow a trainer without get_predict_func
parent
608ad4a9
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
2 deletions
+2
-2
tensorpack/tfutils/summary.py
tensorpack/tfutils/summary.py
+1
-0
tensorpack/train/base.py
tensorpack/train/base.py
+1
-2
No files found.
tensorpack/tfutils/summary.py
View file @
6221d17d
...
@@ -101,6 +101,7 @@ def add_moving_summary(v, *args):
...
@@ -101,6 +101,7 @@ def add_moving_summary(v, *args):
assert
x
.
get_shape
()
.
ndims
==
0
assert
x
.
get_shape
()
.
ndims
==
0
tf
.
add_to_collection
(
MOVING_SUMMARY_VARS_KEY
,
x
)
tf
.
add_to_collection
(
MOVING_SUMMARY_VARS_KEY
,
x
)
@
memoized
def
summary_moving_average
(
tensors
=
None
):
def
summary_moving_average
(
tensors
=
None
):
"""
"""
Create a MovingAverage op and summary for tensors
Create a MovingAverage op and summary for tensors
...
...
tensorpack/train/base.py
View file @
6221d17d
...
@@ -59,10 +59,9 @@ class Trainer(object):
...
@@ -59,10 +59,9 @@ class Trainer(object):
""" run an iteration"""
""" run an iteration"""
pass
pass
@
abstractmethod
def
get_predict_func
(
self
,
input_names
,
output_names
):
def
get_predict_func
(
self
,
input_names
,
output_names
):
""" return a online predictor"""
""" return a online predictor"""
pass
raise
NotImplementedError
()
def
get_predict_funcs
(
self
,
input_names
,
output_names
,
n
):
def
get_predict_funcs
(
self
,
input_names
,
output_names
,
n
):
""" return n predictor functions.
""" return n predictor functions.
...
...
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