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
365c56d2
Commit
365c56d2
authored
Jan 02, 2018
by
Yuxin Wu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix ns in replicated mode
parent
8380cfa7
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
2 deletions
+5
-2
tensorpack/graph_builder/utils.py
tensorpack/graph_builder/utils.py
+4
-1
tensorpack/models/regularize.py
tensorpack/models/regularize.py
+1
-1
No files found.
tensorpack/graph_builder/utils.py
View file @
365c56d2
...
...
@@ -40,9 +40,12 @@ def override_to_local_variable(enable=True):
_replace_global_by_local
(
kwargs
)
return
getter
(
name
,
*
args
,
**
kwargs
)
orig_vs
=
tf
.
get_variable_scope
()
# TODO TF1.5 has https://github.com/tensorflow/tensorflow/pull/14390
with
tf
.
variable_scope
(
tf
.
get_variable_scope
(),
custom_getter
=
custom_getter
):
with
tf
.
name_scope
(
orig_vs
.
original_name_scope
):
yield
else
:
yield
...
...
tensorpack/models/regularize.py
View file @
365c56d2
...
...
@@ -107,7 +107,7 @@ def regularize_cost_from_collection(name='regularize_cost'):
losses
=
tf
.
get_collection
(
tf
.
GraphKeys
.
REGULARIZATION_LOSSES
)
if
len
(
losses
)
>
0
:
logger
.
info
(
"Add REGULARIZATION_LOSSES of {} tensors on the total cost."
.
format
(
len
(
losses
)))
reg_loss
=
tf
.
add_n
(
losses
)
reg_loss
=
tf
.
add_n
(
losses
,
name
=
name
)
return
reg_loss
else
:
return
None
...
...
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