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
1d8511f8
Commit
1d8511f8
authored
Nov 02, 2018
by
VictorSanh
Browse files
FIX small bugs in `run_classifier_pytorch.py`
parent
936eb4c3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
run_classifier_pytorch.py
run_classifier_pytorch.py
+1
-1
No files found.
run_classifier_pytorch.py
View file @
1d8511f8
...
...
@@ -512,7 +512,7 @@ def main():
train_dataloader
=
DataLoader
(
train_data
,
sampler
=
train_sampler
,
batch_size
=
args
.
train_batch_size
)
model
.
train
()
for
epoch
in
range
(
args
.
num_train_epochs
):
for
epoch
in
range
(
int
(
args
.
num_train_epochs
)
)
:
for
input_ids
,
input_mask
,
segment_ids
,
label_ids
in
train_dataloader
:
input_ids
=
input_ids
.
to
(
device
)
input_mask
=
input_mask
.
float
().
to
(
device
)
...
...
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