seq2seq.pytorch
seq2seq.pytorch copied to clipboard
module 'torch.nn' has no attribute 'MultiheadAttention'
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?
Upgrade to PyTorch 1.3 can solve this problem.