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
fe4e6b65
Commit
fe4e6b65
authored
May 14, 2020
by
Hongkun Yu
Committed by
A. Unique TensorFlower
May 14, 2020
Browse files
Internal change
PiperOrigin-RevId: 311626933
parent
3dccfae1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
1 deletion
+10
-1
official/vision/image_classification/resnet/common.py
official/vision/image_classification/resnet/common.py
+10
-1
No files found.
official/vision/image_classification/resnet/common.py
View file @
fe4e6b65
...
@@ -117,7 +117,8 @@ def get_callbacks(
...
@@ -117,7 +117,8 @@ def get_callbacks(
if
FLAGS
.
enable_tensorboard
:
if
FLAGS
.
enable_tensorboard
:
tensorboard_callback
=
tf
.
keras
.
callbacks
.
TensorBoard
(
tensorboard_callback
=
tf
.
keras
.
callbacks
.
TensorBoard
(
log_dir
=
FLAGS
.
model_dir
)
log_dir
=
FLAGS
.
model_dir
,
profile_batch
=
FLAGS
.
profile_steps
)
callbacks
.
append
(
tensorboard_callback
)
callbacks
.
append
(
tensorboard_callback
)
is_pruning_enabled
=
pruning_method
is
not
None
is_pruning_enabled
=
pruning_method
is
not
None
...
@@ -228,6 +229,14 @@ def define_keras_flags(
...
@@ -228,6 +229,14 @@ def define_keras_flags(
flags
.
DEFINE_boolean
(
flags
.
DEFINE_boolean
(
name
=
'enable_tensorboard'
,
default
=
False
,
name
=
'enable_tensorboard'
,
default
=
False
,
help
=
'Whether to enable Tensorboard callback.'
)
help
=
'Whether to enable Tensorboard callback.'
)
flags
.
DEFINE_string
(
name
=
'profile_steps'
,
default
=
None
,
help
=
'Save profiling data to model dir at given range of global steps. The '
'value must be a comma separated pair of positive integers, specifying '
'the first and last step to profile. For example, "--profile_steps=2,4" '
'triggers the profiler to process 3 steps, starting from the 2nd step. '
'Note that profiler has a non-trivial performance overhead, and the '
'output file can be gigantic if profiling many steps.'
)
flags
.
DEFINE_integer
(
flags
.
DEFINE_integer
(
name
=
'train_steps'
,
default
=
None
,
name
=
'train_steps'
,
default
=
None
,
help
=
'The number of steps to run for training. If it is larger than '
help
=
'The number of steps to run for training. If it is larger than '
...
...
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