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
cc746a50
Commit
cc746a50
authored
May 28, 2020
by
Victor SANH
Browse files
flake8 compliance
parent
b11386e1
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
4 additions
and
2 deletions
+4
-2
examples/movement-pruning/bertarize.py
examples/movement-pruning/bertarize.py
+1
-1
examples/movement-pruning/counts_parameters.py
examples/movement-pruning/counts_parameters.py
+1
-1
examples/movement-pruning/emmental/__init__.py
examples/movement-pruning/emmental/__init__.py
+1
-0
examples/movement-pruning/emmental/modules/__init__.py
examples/movement-pruning/emmental/modules/__init__.py
+1
-0
No files found.
examples/movement-pruning/bertarize.py
View file @
cc746a50
...
@@ -100,7 +100,7 @@ if __name__ == "__main__":
...
@@ -100,7 +100,7 @@ if __name__ == "__main__":
parser
.
add_argument
(
parser
.
add_argument
(
"--pruning_method"
,
"--pruning_method"
,
choices
=
[
"l0"
,
"magnitude"
,
"topK"
,
"sigmoied_threshold"
,
],
choices
=
[
"l0"
,
"magnitude"
,
"topK"
,
"sigmoied_threshold"
],
type
=
str
,
type
=
str
,
required
=
True
,
required
=
True
,
help
=
"Pruning Method (l0 = L0 regularization, magnitude = Magnitude pruning, topK = Movement pruning, sigmoied_threshold = Soft movement pruning)"
,
help
=
"Pruning Method (l0 = L0 regularization, magnitude = Magnitude pruning, topK = Movement pruning, sigmoied_threshold = Soft movement pruning)"
,
...
...
examples/movement-pruning/counts_parameters.py
View file @
cc746a50
...
@@ -67,7 +67,7 @@ if __name__ == "__main__":
...
@@ -67,7 +67,7 @@ if __name__ == "__main__":
parser
.
add_argument
(
parser
.
add_argument
(
"--pruning_method"
,
"--pruning_method"
,
choices
=
[
"l0"
,
"topK"
,
"sigmoied_threshold"
,
],
choices
=
[
"l0"
,
"topK"
,
"sigmoied_threshold"
],
type
=
str
,
type
=
str
,
required
=
True
,
required
=
True
,
help
=
"Pruning Method (l0 = L0 regularization, topK = Movement pruning, sigmoied_threshold = Soft movement pruning)"
,
help
=
"Pruning Method (l0 = L0 regularization, topK = Movement pruning, sigmoied_threshold = Soft movement pruning)"
,
...
...
examples/movement-pruning/emmental/__init__.py
View file @
cc746a50
# flake8: noqa
from
.configuration_bert_masked
import
MaskedBertConfig
from
.configuration_bert_masked
import
MaskedBertConfig
from
.modeling_bert_masked
import
(
from
.modeling_bert_masked
import
(
MaskedBertForMultipleChoice
,
MaskedBertForMultipleChoice
,
...
...
examples/movement-pruning/emmental/modules/__init__.py
View file @
cc746a50
# flake8: noqa
from
.binarizer
import
MagnitudeBinarizer
,
ThresholdBinarizer
,
TopKBinarizer
from
.binarizer
import
MagnitudeBinarizer
,
ThresholdBinarizer
,
TopKBinarizer
from
.masked_nn
import
MaskedLinear
from
.masked_nn
import
MaskedLinear
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