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
087e66db
Commit
087e66db
authored
Sep 15, 2017
by
Yuxin Wu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix bug in EnableCallbackIf when used with before_run
parent
ac09ed56
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
2 deletions
+2
-2
tensorpack/callbacks/trigger.py
tensorpack/callbacks/trigger.py
+1
-1
tensorpack/train/base.py
tensorpack/train/base.py
+1
-1
No files found.
tensorpack/callbacks/trigger.py
View file @
087e66db
...
@@ -94,7 +94,7 @@ class EnableCallbackIf(ProxyCallback):
...
@@ -94,7 +94,7 @@ class EnableCallbackIf(ProxyCallback):
def
_before_run
(
self
,
ctx
):
def
_before_run
(
self
,
ctx
):
if
self
.
_pred
(
self
):
if
self
.
_pred
(
self
):
super
(
EnableCallbackIf
,
self
)
.
_before_run
(
ctx
)
return
super
(
EnableCallbackIf
,
self
)
.
_before_run
(
ctx
)
def
_after_run
(
self
,
ctx
,
rv
):
def
_after_run
(
self
,
ctx
,
rv
):
if
self
.
_pred
(
self
):
if
self
.
_pred
(
self
):
...
...
tensorpack/train/base.py
View file @
087e66db
...
@@ -66,7 +66,7 @@ class Trainer(object):
...
@@ -66,7 +66,7 @@ class Trainer(object):
config (TrainConfig): the config used in this trainer.
config (TrainConfig): the config used in this trainer.
model (ModelDesc): alias for ``config.model``.
model (ModelDesc): alias for ``config.model``.
sess (tf.Session): the current session in use.
sess (tf.Session): the current session in use.
hooked_sess (tf.MonitoredSession): the session with hooks.
hooked_sess (tf.
train.
MonitoredSession): the session with hooks.
monitors (Monitors): the monitors. Other callbacks can use it for logging.
monitors (Monitors): the monitors. Other callbacks can use it for logging.
local_step (int): the number of (tensorpack) steps that have finished in the current epoch.
local_step (int): the number of (tensorpack) steps that have finished in the current epoch.
"""
"""
...
...
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