美文网首页
2021-10-17 Debug

2021-10-17 Debug

作者: Joyner2018 | 来源:发表于2021-10-17 19:03 被阅读0次

    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

    相关文章

      网友评论

          本文标题:2021-10-17 Debug

          本文链接:https://www.haomeiwen.com/subject/wipwoltx.html