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
3dcd7d32
Commit
3dcd7d32
authored
Sep 21, 2017
by
Yuxin Wu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update docs
parent
978f06a6
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
3 deletions
+7
-3
tensorpack/callbacks/param.py
tensorpack/callbacks/param.py
+2
-2
tensorpack/train/base.py
tensorpack/train/base.py
+5
-1
No files found.
tensorpack/callbacks/param.py
View file @
3dcd7d32
...
...
@@ -140,8 +140,8 @@ class HyperParamSetter(Callback):
"""
ret
=
self
.
_get_value_to_set
()
if
ret
is
not
None
and
ret
!=
self
.
last_value
:
logger
.
info
(
"
{} at epoch
{} will change to {:.8f}"
.
format
(
self
.
param
.
readable_name
,
self
.
epoch_num
+
1
,
ret
))
logger
.
info
(
"
After epoch {},
{} will change to {:.8f}"
.
format
(
self
.
epoch_num
,
self
.
param
.
readable_name
,
ret
))
self
.
last_value
=
ret
return
ret
...
...
tensorpack/train/base.py
View file @
3dcd7d32
...
...
@@ -95,7 +95,11 @@ class Trainer(object):
@
property
def
epoch_num
(
self
):
"""
The number of epochs that have finished.
The number of the currently ongoing epoch.
An epoch is defined to cover the moment before calling `before_epoch` until after calling `trigger_epoch`.
i.e., in the `trigger_epoch` of epoch 3, `self.epoch_num` is 3.
If you need use `self.epoch_num` in your callback, you'll need to know this.
"""
if
self
.
_epoch_num
is
not
None
:
# has started training
...
...
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