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
OpenDAS
vision
Commits
ba4b0db5
Unverified
Commit
ba4b0db5
authored
May 31, 2022
by
Vasilis Vryniotis
Committed by
GitHub
May 31, 2022
Browse files
Add missing `_version` to the MLPBlock (#6113)
* Add missing `_version` to the MLPBlock * fix linter
parent
2a810713
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
0 deletions
+2
-0
torchvision/models/vision_transformer.py
torchvision/models/vision_transformer.py
+2
-0
No files found.
torchvision/models/vision_transformer.py
View file @
ba4b0db5
...
...
@@ -40,6 +40,8 @@ class ConvStemConfig(NamedTuple):
class
MLPBlock
(
MLP
):
"""Transformer MLP block."""
_version
=
2
def
__init__
(
self
,
in_dim
:
int
,
mlp_dim
:
int
,
dropout
:
float
):
super
().
__init__
(
in_dim
,
[
mlp_dim
,
in_dim
],
activation_layer
=
nn
.
GELU
,
inplace
=
None
,
dropout
=
dropout
)
...
...
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