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
59353708
Commit
59353708
authored
Jul 01, 2020
by
Hongkun Yu
Committed by
A. Unique TensorFlower
Jul 01, 2020
Browse files
Fix typo and grammar errors.
PiperOrigin-RevId: 319276332
parent
b43418ad
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
official/core/base_task.py
official/core/base_task.py
+4
-4
No files found.
official/core/base_task.py
View file @
59353708
...
...
@@ -59,7 +59,7 @@ class Task(tf.Module):
def
initialize
(
self
,
model
:
tf
.
keras
.
Model
):
"""A callback function used as CheckpointManager's init_fn.
This function will be called when no checkpoint found for the model.
This function will be called when no checkpoint
is
found for the model.
If there is a checkpoint, the checkpoint will be loaded and this function
will not be called. You can use this callback function to load a pretrained
checkpoint, saved under a directory other than the model_dir.
...
...
@@ -71,7 +71,7 @@ class Task(tf.Module):
@
abc
.
abstractmethod
def
build_model
(
self
)
->
tf
.
keras
.
Model
:
"""Creates
the
model architecture.
"""Creates model architecture.
Returns:
A model instance.
...
...
@@ -135,7 +135,7 @@ class Task(tf.Module):
Args:
labels: optional label tensors.
model_outputs: a nested structure of output tensors.
aux_losses: auxiliar
l
y loss tensors, i.e. `losses` in keras.Model.
aux_losses: auxiliary loss tensors, i.e. `losses` in keras.Model.
Returns:
The total loss tensor.
...
...
@@ -232,7 +232,7 @@ class Task(tf.Module):
return
logs
def
validation_step
(
self
,
inputs
,
model
:
tf
.
keras
.
Model
,
metrics
=
None
):
"""Validat
at
ion step.
"""Validation step.
With distribution strategies, this method runs on devices.
...
...
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