Skip to content

Commit ba4b0db

Browse files
authored
Add missing _version to the MLPBlock (#6113)
* Add missing `_version` to the MLPBlock * fix linter
1 parent 2a81071 commit ba4b0db

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

torchvision/models/vision_transformer.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,8 @@ class ConvStemConfig(NamedTuple):
4040
class MLPBlock(MLP):
4141
"""Transformer MLP block."""
4242

43+
_version = 2
44+
4345
def __init__(self, in_dim: int, mlp_dim: int, dropout: float):
4446
super().__init__(in_dim, [mlp_dim, in_dim], activation_layer=nn.GELU, inplace=None, dropout=dropout)
4547

0 commit comments

Comments
 (0)