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
cab7d39e
Commit
cab7d39e
authored
Jun 26, 2019
by
Yuxin Wu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[AccumGradOptimizer] colocation of counter is not useful
parent
40c3ab6a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
3 deletions
+1
-3
tensorpack/tfutils/optimizer.py
tensorpack/tfutils/optimizer.py
+1
-3
No files found.
tensorpack/tfutils/optimizer.py
View file @
cab7d39e
...
...
@@ -189,9 +189,7 @@ class AccumGradOptimizer(ProxyOptimizer):
slots
=
self
.
_create_accum_slots
(
vs
)
slots_and_vars
=
[(
s
,
gv
[
1
])
for
s
,
gv
in
zip
(
slots
,
grads_and_vars
)]
# Create the counter on the same device as the first variable.
with
tf
.
variable_scope
(
self
.
_name
),
\
vs
[
0
]
.
graph
.
colocate_with
(
vs
[
0
]):
with
tf
.
variable_scope
(
self
.
_name
),
tf
.
device
(
'/cpu:0'
):
counter
=
tf
.
Variable
(
0
,
name
=
"counter"
,
trainable
=
False
,
dtype
=
tf
.
int32
)
...
...
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