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
4196bfed
Commit
4196bfed
authored
Mar 08, 2021
by
Sylvain Gugger
Browse files
Revert "Style"
This reverts commit
a8ec52ef
.
parent
a8ec52ef
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
2 deletions
+2
-2
tests/test_trainer.py
tests/test_trainer.py
+1
-1
tests/test_trainer_utils.py
tests/test_trainer_utils.py
+1
-1
No files found.
tests/test_trainer.py
View file @
4196bfed
...
@@ -992,7 +992,7 @@ class TrainerIntegrationTest(unittest.TestCase):
...
@@ -992,7 +992,7 @@ class TrainerIntegrationTest(unittest.TestCase):
# should be about half of fp16_init
# should be about half of fp16_init
# perfect world: fp32_init/2 == fp16_eval
# perfect world: fp32_init/2 == fp16_eval
self
.
assertAlmostEqual
(
fp16_eval
,
fp32_init
/
2
,
delta
=
5_000
)
self
.
assertAlmostEqual
(
fp16_eval
,
fp32_init
/
2
,
delta
=
5_000
)
def
test_no_wd_param_group
(
self
):
def
test_no_wd_param_group
(
self
):
model
=
torch
.
nn
.
Sequential
(
TstLayer
(
128
),
torch
.
nn
.
ModuleList
([
TstLayer
(
128
),
TstLayer
(
128
)]))
model
=
torch
.
nn
.
Sequential
(
TstLayer
(
128
),
torch
.
nn
.
ModuleList
([
TstLayer
(
128
),
TstLayer
(
128
)]))
trainer
=
Trainer
(
model
=
model
)
trainer
=
Trainer
(
model
=
model
)
...
...
tests/test_trainer_utils.py
View file @
4196bfed
...
@@ -30,7 +30,7 @@ if is_torch_available():
...
@@ -30,7 +30,7 @@ if is_torch_available():
DistributedTensorGatherer
,
DistributedTensorGatherer
,
LabelSmoother
,
LabelSmoother
,
LengthGroupedSampler
,
LengthGroupedSampler
,
get_parameter_names
,
get_parameter_names
)
)
class
TstLayer
(
torch
.
nn
.
Module
):
class
TstLayer
(
torch
.
nn
.
Module
):
...
...
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