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
fadd4e1c
Commit
fadd4e1c
authored
Jul 10, 2020
by
A. Unique TensorFlower
Browse files
Minor cleanup - re-order instance vars to match docstring, add missing documentation.
PiperOrigin-RevId: 320704971
parent
1bfb577d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
9 deletions
+14
-9
official/modeling/hyperparams/config_definitions.py
official/modeling/hyperparams/config_definitions.py
+14
-9
No files found.
official/modeling/hyperparams/config_definitions.py
View file @
fadd4e1c
...
@@ -14,6 +14,7 @@
...
@@ -14,6 +14,7 @@
# limitations under the License.
# limitations under the License.
# ==============================================================================
# ==============================================================================
"""Common configuration settings."""
"""Common configuration settings."""
from
typing
import
Optional
,
Union
from
typing
import
Optional
,
Union
import
dataclasses
import
dataclasses
...
@@ -123,8 +124,8 @@ class RuntimeConfig(base_config.Config):
...
@@ -123,8 +124,8 @@ class RuntimeConfig(base_config.Config):
task_index
:
int
=
-
1
task_index
:
int
=
-
1
all_reduce_alg
:
Optional
[
str
]
=
None
all_reduce_alg
:
Optional
[
str
]
=
None
num_packs
:
int
=
1
num_packs
:
int
=
1
loss_scale
:
Optional
[
Union
[
str
,
float
]]
=
None
mixed_precision_dtype
:
Optional
[
str
]
=
None
mixed_precision_dtype
:
Optional
[
str
]
=
None
loss_scale
:
Optional
[
Union
[
str
,
float
]]
=
None
run_eagerly
:
bool
=
False
run_eagerly
:
bool
=
False
batchnorm_spatial_persistent
:
bool
=
False
batchnorm_spatial_persistent
:
bool
=
False
...
@@ -172,23 +173,27 @@ class TrainerConfig(base_config.Config):
...
@@ -172,23 +173,27 @@ class TrainerConfig(base_config.Config):
eval_tf_function: whether or not to use tf_function for eval.
eval_tf_function: whether or not to use tf_function for eval.
steps_per_loop: number of steps per loop.
steps_per_loop: number of steps per loop.
summary_interval: number of steps between each summary.
summary_interval: number of steps between each summary.
checkpoint_interval
s
: number of steps between checkpoints.
checkpoint_interval: number of steps between checkpoints.
max_to_keep: max checkpoints to keep.
max_to_keep: max checkpoints to keep.
continuous_eval_timeout: maximum number of seconds to wait between
continuous_eval_timeout: maximum number of seconds to wait between
checkpoints, if set to None, continuous eval will wait indefinetely.
checkpoints, if set to None, continuous eval will wait indefinitely.
train_steps: number of train steps.
validation_steps: number of eval steps. If `None`, the entire eval dataset
is used.
validation_interval: number of training steps to run between evaluations.
"""
"""
optimizer_config
:
OptimizationConfig
=
OptimizationConfig
()
optimizer_config
:
OptimizationConfig
=
OptimizationConfig
()
train_
steps
:
int
=
0
train_
tf_while_loop
:
bool
=
True
validation_steps
:
Optional
[
int
]
=
Non
e
train_tf_function
:
bool
=
Tru
e
val
idation_interval
:
int
=
1000
e
val
_tf_function
:
bool
=
True
steps_per_loop
:
int
=
1000
steps_per_loop
:
int
=
1000
summary_interval
:
int
=
1000
summary_interval
:
int
=
1000
checkpoint_interval
:
int
=
1000
checkpoint_interval
:
int
=
1000
max_to_keep
:
int
=
5
max_to_keep
:
int
=
5
continuous_eval_timeout
:
Optional
[
int
]
=
None
continuous_eval_timeout
:
Optional
[
int
]
=
None
train_
tf_while_loop
:
bool
=
True
train_
steps
:
int
=
0
train_tf_function
:
bool
=
Tru
e
validation_steps
:
Optional
[
int
]
=
Non
e
e
val
_tf_function
:
bool
=
True
val
idation_interval
:
int
=
1000
@
dataclasses
.
dataclass
@
dataclasses
.
dataclass
...
...
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