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
f5ba2692
Commit
f5ba2692
authored
Nov 06, 2018
by
Yuxin Wu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix #973
parent
683e43ff
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
1 deletion
+6
-1
tensorpack/contrib/keras.py
tensorpack/contrib/keras.py
+6
-1
No files found.
tensorpack/contrib/keras.py
View file @
f5ba2692
...
...
@@ -259,10 +259,15 @@ class KerasModel(object):
"""
Args:
validation_data (DataFlow or InputSource): to be used for inference.
The inference callback is added as the first in the callback list.
If you need to use it in a different order, please write it in the callback list manually.
kwargs: same as `self.trainer.train_with_defaults`.
"""
callbacks
=
kwargs
.
pop
(
'callbacks'
,
[])
if
validation_data
is
not
None
:
callbacks
.
append
(
InferenceRunner
(
# There is no way to guess where users want this callback. So we have to choose one.
# MinSaver may need results from this callback,
# so we put this callback at first.
callbacks
.
insert
(
0
,
InferenceRunner
(
validation_data
,
ScalarStats
(
self
.
_stats_to_inference
)))
self
.
trainer
.
train_with_defaults
(
callbacks
=
callbacks
,
**
kwargs
)
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