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
564fd75d
Unverified
Commit
564fd75d
authored
Feb 20, 2020
by
guillaume-be
Committed by
GitHub
Feb 20, 2020
Browse files
Removed unused fields in DistilBert TransformerBlock (#2710)
* Removed unused fields in DistilBert TransformerBlock
parent
889d3bfd
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
5 deletions
+0
-5
src/transformers/modeling_distilbert.py
src/transformers/modeling_distilbert.py
+0
-5
No files found.
src/transformers/modeling_distilbert.py
View file @
564fd75d
...
...
@@ -217,11 +217,6 @@ class TransformerBlock(nn.Module):
def
__init__
(
self
,
config
):
super
().
__init__
()
self
.
n_heads
=
config
.
n_heads
self
.
dim
=
config
.
dim
self
.
hidden_dim
=
config
.
hidden_dim
self
.
dropout
=
nn
.
Dropout
(
p
=
config
.
dropout
)
self
.
activation
=
config
.
activation
self
.
output_attentions
=
config
.
output_attentions
assert
config
.
dim
%
config
.
n_heads
==
0
...
...
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