Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ModelZoo
ResNet50_tensorflow
Commits
0ef1cce3
Commit
0ef1cce3
authored
Jun 11, 2021
by
Hongkun Yu
Committed by
A. Unique TensorFlower
Jun 11, 2021
Browse files
Internal change
PiperOrigin-RevId: 378899878
parent
7af2ff16
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
official/core/base_trainer.py
official/core/base_trainer.py
+3
-2
No files found.
official/core/base_trainer.py
View file @
0ef1cce3
...
@@ -246,10 +246,11 @@ class Trainer(_AsyncTrainer):
...
@@ -246,10 +246,11 @@ class Trainer(_AsyncTrainer):
self
.
_train_loss
=
tf
.
keras
.
metrics
.
Mean
(
"training_loss"
,
dtype
=
tf
.
float32
)
self
.
_train_loss
=
tf
.
keras
.
metrics
.
Mean
(
"training_loss"
,
dtype
=
tf
.
float32
)
self
.
_validation_loss
=
tf
.
keras
.
metrics
.
Mean
(
self
.
_validation_loss
=
tf
.
keras
.
metrics
.
Mean
(
"validation_loss"
,
dtype
=
tf
.
float32
)
"validation_loss"
,
dtype
=
tf
.
float32
)
model_metrics
=
model
.
metrics
if
hasattr
(
model
,
"metrics"
)
else
[]
self
.
_train_metrics
=
self
.
task
.
build_metrics
(
self
.
_train_metrics
=
self
.
task
.
build_metrics
(
training
=
True
)
+
self
.
model
.
metrics
training
=
True
)
+
model
_
metrics
self
.
_validation_metrics
=
self
.
task
.
build_metrics
(
self
.
_validation_metrics
=
self
.
task
.
build_metrics
(
training
=
False
)
+
self
.
model
.
metrics
training
=
False
)
+
model
_
metrics
self
.
init_async
()
self
.
init_async
()
...
...
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