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
16a1f338
Commit
16a1f338
authored
Jun 18, 2019
by
thomwolf
Browse files
fixing
parent
92e0ad5a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
examples/run_classifier.py
examples/run_classifier.py
+4
-4
No files found.
examples/run_classifier.py
View file @
16a1f338
...
@@ -222,6 +222,10 @@ def main():
...
@@ -222,6 +222,10 @@ def main():
elif
n_gpu
>
1
:
elif
n_gpu
>
1
:
model
=
torch
.
nn
.
DataParallel
(
model
)
model
=
torch
.
nn
.
DataParallel
(
model
)
global_step
=
0
nb_tr_steps
=
0
tr_loss
=
0
if
args
.
do_train
:
if
args
.
do_train
:
if
args
.
local_rank
in
[
-
1
,
0
]:
if
args
.
local_rank
in
[
-
1
,
0
]:
tb_writer
=
SummaryWriter
()
tb_writer
=
SummaryWriter
()
...
@@ -293,10 +297,6 @@ def main():
...
@@ -293,10 +297,6 @@ def main():
warmup
=
args
.
warmup_proportion
,
warmup
=
args
.
warmup_proportion
,
t_total
=
num_train_optimization_steps
)
t_total
=
num_train_optimization_steps
)
global_step
=
0
nb_tr_steps
=
0
tr_loss
=
0
logger
.
info
(
"***** Running training *****"
)
logger
.
info
(
"***** Running training *****"
)
logger
.
info
(
" Num examples = %d"
,
len
(
train_examples
))
logger
.
info
(
" Num examples = %d"
,
len
(
train_examples
))
logger
.
info
(
" Batch size = %d"
,
args
.
train_batch_size
)
logger
.
info
(
" Batch size = %d"
,
args
.
train_batch_size
)
...
...
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