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
32c83fea
Commit
32c83fea
authored
Feb 06, 2018
by
Yuxin Wu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Keras] summarize total loss (fix #634)
parent
5b7d5106
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
tensorpack/contrib/keras.py
tensorpack/contrib/keras.py
+1
-1
No files found.
tensorpack/contrib/keras.py
View file @
32c83fea
...
@@ -141,8 +141,8 @@ def setup_keras_trainer(
...
@@ -141,8 +141,8 @@ def setup_keras_trainer(
total_loss
=
tf
.
add_n
(
loss_tensors
+
[
loss_reg
],
name
=
TOTAL_LOSS_NAME
)
total_loss
=
tf
.
add_n
(
loss_tensors
+
[
loss_reg
],
name
=
TOTAL_LOSS_NAME
)
add_moving_summary
(
loss_reg
,
total_loss
,
*
loss_tensors
)
add_moving_summary
(
loss_reg
,
total_loss
,
*
loss_tensors
)
else
:
else
:
add_moving_summary
(
*
loss_tensors
)
total_loss
=
tf
.
add_n
(
loss_tensors
,
name
=
TOTAL_LOSS_NAME
)
total_loss
=
tf
.
add_n
(
loss_tensors
,
name
=
TOTAL_LOSS_NAME
)
add_moving_summary
(
total_loss
,
*
loss_tensors
)
if
metrics
and
(
ctx
.
is_main_training_tower
or
not
ctx
.
is_training
):
if
metrics
and
(
ctx
.
is_main_training_tower
or
not
ctx
.
is_training
):
# for list: one metric for each output
# for list: one metric for each output
...
...
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