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
9f995b99
Commit
9f995b99
authored
Sep 19, 2019
by
VictorSanh
Browse files
minor fixes
parent
3fe5c8e8
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
3 deletions
+2
-3
examples/distillation/distiller.py
examples/distillation/distiller.py
+0
-1
examples/distillation/train.py
examples/distillation/train.py
+2
-2
No files found.
examples/distillation/distiller.py
View file @
9f995b99
...
...
@@ -115,7 +115,6 @@ class Distiller:
betas
=
(
0.9
,
0.98
))
warmup_steps
=
math
.
ceil
(
num_train_optimization_steps
*
params
.
warmup_prop
)
logger
.
info
(
f
'--- Scheduler:
{
params
.
scheduler_type
}
'
)
self
.
scheduler
=
WarmupLinearSchedule
(
self
.
optimizer
,
warmup_steps
=
warmup_steps
,
t_total
=
num_train_optimization_steps
)
...
...
examples/distillation/train.py
View file @
9f995b99
...
...
@@ -204,8 +204,8 @@ def main():
## STUDENT ##
if
args
.
from_pretrained_weights
is
not
None
:
assert
os
.
path
.
isfile
(
os
.
path
.
join
(
args
.
from_pretrained_weights
)
)
assert
os
.
path
.
isfile
(
os
.
path
.
join
(
args
.
from_pretrained_config
)
)
assert
os
.
path
.
isfile
(
args
.
from_pretrained_weights
)
assert
os
.
path
.
isfile
(
args
.
from_pretrained_config
)
logger
.
info
(
f
'Loading pretrained weights from
{
args
.
from_pretrained_weights
}
'
)
logger
.
info
(
f
'Loading pretrained config from
{
args
.
from_pretrained_config
}
'
)
stu_architecture_config
=
DistilBertConfig
.
from_json_file
(
args
.
from_pretrained_config
)
...
...
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