Skip to content

module 'torch.nn' has no attribute 'MultiheadAttention' #13

@chenQ1114

Description

@chenQ1114

Hi
In the file of modules/attention.py, the class MultiHeadAttention(nn.MultiheadAttention) is reported an error:

class MultiHeadAttention(nn.MultiheadAttention):
AttributeError: module 'torch.nn' has no attribute 'MultiheadAttention'

I use the pytorch=0.4.1. Is there any version of torch that containing the nn.MultiheadAttention?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions