Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
chenpangpang
transformers
Commits
2bd950ca
Unverified
Commit
2bd950ca
authored
Nov 29, 2021
by
Kamal Raj
Committed by
GitHub
Nov 29, 2021
Browse files
[Flax] token-classification model steps enumerate start from 1 (#14547)
* step start from 1 * Updated cur_step calcualtion
parent
cea17acd
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
examples/flax/token-classification/run_flax_ner.py
examples/flax/token-classification/run_flax_ner.py
+1
-1
No files found.
examples/flax/token-classification/run_flax_ner.py
View file @
2bd950ca
...
...
@@ -598,7 +598,7 @@ def main():
state
,
train_metric
,
dropout_rngs
=
p_train_step
(
state
,
batch
,
dropout_rngs
)
train_metrics
.
append
(
train_metric
)
cur_step
=
epoch
*
step_per_epoch
+
step
cur_step
=
(
epoch
*
step_per_epoch
)
+
(
step
+
1
)
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