恭喜!

Transformer Models with PyTorch

James Chapman

Curriculum Manager, DataCamp

第 1 章

model = nn.Transformer(
    d_model=1536,
    nhead=8,
    num_encoder_layers=6,
    num_decoder_layers=6
)
class InputEmbeddings(nn.Module): ...
class PositionalEncoding(nn.Module): ...
class MultiHeadAttention(nn.Module): ...

學術論文「Attention Is All You Need」中的 transformers 架構。

Transformer Models with PyTorch

僅編碼器的 transformer

僅編碼器的 transformer 架構

僅解碼器的 transformer

僅解碼器的 transformer 架構

Transformer Models with PyTorch

第 2 章-編碼器-解碼器 transformer

原始 transformer 架構

Transformer Models with PyTorch

下一步是什麼?

Transformer Models with PyTorch

一起來練習吧!

Transformer Models with PyTorch

Preparing Video For Download...