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
363777e4
Commit
363777e4
authored
Dec 15, 2017
by
Yuxin Wu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Don't colocate weight_decay. Affect speeds for PS mode.
parent
4c1d57d2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
4 deletions
+1
-4
tensorpack/models/regularize.py
tensorpack/models/regularize.py
+1
-4
No files found.
tensorpack/models/regularize.py
View file @
363777e4
...
...
@@ -56,8 +56,6 @@ def regularize_cost(regex, func, name='regularize_cost'):
else
:
params
=
tf
.
trainable_variables
()
G
=
tf
.
get_default_graph
()
to_regularize
=
[]
with
tf
.
name_scope
(
name
+
'_internals'
):
...
...
@@ -65,8 +63,7 @@ def regularize_cost(regex, func, name='regularize_cost'):
for
p
in
params
:
para_name
=
p
.
op
.
name
if
re
.
search
(
regex
,
para_name
):
with
G
.
colocate_with
(
p
):
costs
.
append
(
func
(
p
))
costs
.
append
(
func
(
p
))
to_regularize
.
append
(
p
.
name
)
if
not
costs
:
return
tf
.
constant
(
0
,
dtype
=
tf
.
float32
,
name
=
'empty_'
+
name
)
...
...
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