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
2e48b3e8
Unverified
Commit
2e48b3e8
authored
Jul 11, 2024
by
Sai-Suraj-27
Committed by
GitHub
Jul 11, 2024
Browse files
fix: Fixed the `1st argument` name in classmethods (#31907)
Fixed the first argument name in few classmethods.
parent
48c20700
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
src/transformers/models/layoutlmv2/configuration_layoutlmv2.py
...ransformers/models/layoutlmv2/configuration_layoutlmv2.py
+1
-1
tests/optimization/test_optimization.py
tests/optimization/test_optimization.py
+2
-2
No files found.
src/transformers/models/layoutlmv2/configuration_layoutlmv2.py
View file @
2e48b3e8
...
...
@@ -177,7 +177,7 @@ class LayoutLMv2Config(PretrainedConfig):
)
@
classmethod
def
get_default_detectron2_config
(
self
):
def
get_default_detectron2_config
(
cls
):
return
{
"MODEL.MASK_ON"
:
True
,
"MODEL.PIXEL_STD"
:
[
57.375
,
57.120
,
58.395
],
...
...
tests/optimization/test_optimization.py
View file @
2e48b3e8
...
...
@@ -209,5 +209,5 @@ class LambdaScheduleWrapper:
return
self
.
fn
(
*
args
,
**
kwargs
)
@
classmethod
def
wrap_scheduler
(
self
,
scheduler
):
scheduler
.
lr_lambdas
=
list
(
map
(
self
,
scheduler
.
lr_lambdas
))
def
wrap_scheduler
(
cls
,
scheduler
):
scheduler
.
lr_lambdas
=
list
(
map
(
cls
,
scheduler
.
lr_lambdas
))
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