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
chenpangpang
transformers
Commits
4605b2b8
Unverified
Commit
4605b2b8
authored
Jul 05, 2021
by
Patrick von Platen
Committed by
GitHub
Jul 05, 2021
Browse files
[Flax] Fix another bug in logging steps (#12516)
* fix_torch_device_generate_test * remove @ * up
parent
d0f7508a
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
2 deletions
+2
-2
examples/flax/language-modeling/run_mlm_flax.py
examples/flax/language-modeling/run_mlm_flax.py
+1
-1
examples/flax/language-modeling/run_t5_mlm_flax.py
examples/flax/language-modeling/run_t5_mlm_flax.py
+1
-1
No files found.
examples/flax/language-modeling/run_mlm_flax.py
View file @
4605b2b8
...
...
@@ -606,7 +606,7 @@ if __name__ == "__main__":
state
,
train_metric
,
dropout_rngs
=
p_train_step
(
state
,
model_inputs
,
dropout_rngs
)
train_metrics
.
append
(
train_metric
)
cur_step
=
epoch
*
num_train_samples
+
step
cur_step
=
epoch
*
(
num_train_samples
//
train_batch_size
)
+
step
if
cur_step
%
training_args
.
logging_steps
==
0
and
cur_step
>
0
:
# Save metrics
...
...
examples/flax/language-modeling/run_t5_mlm_flax.py
View file @
4605b2b8
...
...
@@ -722,7 +722,7 @@ if __name__ == "__main__":
state
,
train_metric
,
dropout_rngs
=
p_train_step
(
state
,
model_inputs
,
dropout_rngs
)
train_metrics
.
append
(
train_metric
)
cur_step
=
epoch
*
num_train_samples
+
step
cur_step
=
epoch
*
(
num_train_samples
//
train_batch_size
)
+
step
if
cur_step
%
training_args
.
logging_steps
==
0
and
cur_step
>
0
:
# Save metrics
...
...
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