Debug
Traceback (most recent call last):
File "vit.py", line 142, in <module>
emb_dropout = 0.1
File "vit.py", line 100, in __init__
self.transformer = Transformer(dim, depth, heads, dim_head, mlp_dim, dropout)
File "vit.py", line 71, in __init__
PreNorm(dim, FeedForward(dim, mlp_dim, dropout = dropout))
File "vit.py", line 27, in __init__
nn.GELU(),
AttributeError: module 'torch.nn' has no attribute 'GELU'
解决办法
把pytorch的版本升级到1.7
网友评论