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
0146287b
Commit
0146287b
authored
Aug 28, 2019
by
Yuxin Wu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add back horovod broadcast
parent
f43309f0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
7 deletions
+6
-7
tensorpack/train/trainers.py
tensorpack/train/trainers.py
+6
-7
No files found.
tensorpack/train/trainers.py
View file @
0146287b
...
...
@@ -424,15 +424,14 @@ class HorovodTrainer(SingleCostTrainer):
opt
=
get_opt_fn
()
self
.
train_op
=
opt
.
apply_gradients
(
grads
,
name
=
'train_op'
)
def
broadcast
(
self
):
logger
.
info
(
"Running broadcast ..."
)
# the op will be created later in initialize()
self
.
trainer
.
_broadcast_op
.
run
()
# TODO provide a way to sync manually
cb
=
CallbackFactory
(
before_train
=
broadcast
)
.
set_chief_only
(
False
)
cb
=
CallbackFactory
(
before_train
=
self
.
broadcast
,
trigger
=
self
.
broadcast
)
.
set_chief_only
(
False
)
return
[
cb
]
def
broadcast
(
self
,
_
):
logger
.
info
(
"Running broadcast ..."
)
# the op will be created in initialize()
self
.
sess
.
run
(
self
.
_broadcast_op
)
@
HIDE_DOC
def
initialize
(
self
,
session_creator
,
session_init
):
# broadcast_op should be the last setup_graph: it needs to be created
...
...
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