Self Attention with torch.nn.MultiheadAttention Module
Machine Learning with PyTorch
0:00 / 0:00
Self Attention with torch.nn.MultiheadAttention Module
23 285 просмотров · 5 лет назад
Machine Learning with PyTorch
3,43 тыс. подписчиков
23 285 просмотров · 5 лет назад
This video explains how the torch multihead attention module works in Pytorch using a numerical example and also how Pytorch takes care of the dimension. Having a good understanding of the dimension really helps a lot in understanding the how self attention is computed through the key, query and value.
torch version is 1.9.0