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
ff138931
Commit
ff138931
authored
May 21, 2020
by
A. Unique TensorFlower
Browse files
Internal change
PiperOrigin-RevId: 312754139
parent
b1eddf4f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
1 deletion
+2
-1
official/nlp/nhnet/trainer.py
official/nlp/nhnet/trainer.py
+2
-1
No files found.
official/nlp/nhnet/trainer.py
View file @
ff138931
...
...
@@ -60,6 +60,7 @@ def define_flags():
"Initial checkpoint (usually from a pre-trained BERT model)."
)
flags
.
DEFINE_integer
(
"train_steps"
,
100000
,
"Max train steps"
)
flags
.
DEFINE_integer
(
"eval_steps"
,
32
,
"Number of eval steps per run."
)
flags
.
DEFINE_integer
(
"eval_timeout"
,
3000
,
"Timeout waiting for checkpoints."
)
flags
.
DEFINE_integer
(
"train_batch_size"
,
32
,
"Total batch size for training."
)
flags
.
DEFINE_integer
(
"eval_batch_size"
,
4
,
"Total batch size for evaluation."
)
flags
.
DEFINE_integer
(
...
...
@@ -203,7 +204,7 @@ def run():
if
"train"
in
FLAGS
.
mode
:
stats
=
train
(
params
,
strategy
)
if
"eval"
in
FLAGS
.
mode
:
timeout
=
0
if
FLAGS
.
mode
==
"train_and_eval"
else
3000
timeout
=
0
if
FLAGS
.
mode
==
"train_and_eval"
else
FLAGS
.
eval_timeout
# Uses padded decoding for TPU. Always uses cache.
padded_decode
=
isinstance
(
strategy
,
tf
.
distribute
.
experimental
.
TPUStrategy
)
params
.
override
({
...
...
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