René's URL Explorer Experiment


Title: Transformer Layers — PyTorch main documentation

Description: Transformer layers in PyTorch C++ — Transformer, TransformerEncoder, TransformerDecoder, and MultiheadAttention.

Keywords:

direct link

Domain: docs.pytorch.org


Hey, it has json ld scripts:
    {
       "@context": "https://schema.org",
       "@type": "Article",
       "name": "Transformer Layers",
       "headline": "Transformer Layers",
       "description": "Transformer layers in PyTorch C++ \u2014 Transformer, TransformerEncoder, TransformerDecoder, and MultiheadAttention.",
       "url": "/api/nn/transformer.html",
       "articleBody": "Transformer Layers# Transformer layers use self-attention mechanisms to process sequences in parallel, enabling efficient training on long sequences. They are the foundation of modern NLP models (BERT, GPT) and increasingly used in vision and other domains. Transformer: Complete encoder-decoder architecture TransformerEncoder/Decoder: Standalone encoder or decoder stacks TransformerEncoderLayer/DecoderLayer: Individual transformer blocks MultiheadAttention: Core attention mechanism used throughout Key parameters: d_model: Dimension of the model (embedding dimension) nhead: Number of attention heads num_encoder_layers/num_decoder_layers: Number of stacked layers dim_feedforward: Dimension of feedforward network dropout: Dropout rate for regularization Transformer# Complete encoder-decoder transformer architecture. class Transformer : public torch::nn::ModuleHolder\u003cTransformerImpl\u003e# A ModuleHolder subclass for TransformerImpl. See the documentation for TransformerImpl class to learn what methods it provides, and examples of how to use Transformer with torch::nn::TransformerOptions. See the documentation for ModuleHolder to learn about PyTorch\u2019s module storage semantics. Public Types using Impl = TransformerImpl# class TransformerImpl : public torch::nn::Cloneable\u003cTransformerImpl\u003e# A transformer model. User is able to modify the attributes as needed. The architecture is based on the paper \u201cAttention Is All You Need\u201d. Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N Gomez, Lukasz Kaiser, and Illia Polosukhin. 2017. Attention is all you need. In Advances in Neural Information Processing Systems, pages 6000-6010. See https://pytorch.org/docs/stable/generated/torch.nn.Transformer.html to learn about the exact behavior of this transformer model See the documentation for torch::nn::Transformer class to learn what constructor arguments are supported for this encoder layer model Example: Transformer trans(TransformerOptions(512, 8)); Public Functions explicit TransformerImpl(TransformerOptions options_)# Tensor forward(const Tensor \u0026src, const Tensor \u0026tgt, const Tensor \u0026src_mask = {}, const Tensor \u0026tgt_mask = {}, const Tensor \u0026memory_mask = {}, const Tensor \u0026src_key_padding_mask = {}, const Tensor \u0026tgt_key_padding_mask = {}, const Tensor \u0026memory_key_padding_mask = {})# forward function for Transformer Module Args: src: the sequence to the encoder (required). tgt: the sequence to the decoder (required). src_mask: the additive mask for the src sequence (optional). tgt_mask: the additive mask for the tgt sequence (optional). memory_mask: the additive mask for the encoder output (optional). src_key_padding_mask: the ByteTensor mask for src keys per batch (optional). tgt_key_padding_mask: the ByteTensor mask for tgt keys per batch (optional). memory_key_padding_mask: the ByteTensor mask for memory keys per batch (optional). Shape: src: (S, N, E) tgt: (T, N, E) src_mask: (S, S) tgt_mask: (T, T) memory_mask: (T, S) src_key_padding_mask: (N, S) tgt_key_padding_mask: (N, T) memory_key_padding_mask: (N, S) Note: [src/tgt/memory]_mask ensures that position i is allowed to attend the unmasked positions. If a ByteTensor is provided, the non-zero positions are not allowed to attend while the zero positions will be unchanged. If a BoolTensor is provided, positions with True are not allowed to attend while False values will be unchanged. If a FloatTensor is provided, it will be added to the attention weight. [src/tgt/memory]_key_padding_mask provides specified elements in the key to be ignored by the attention. If a ByteTensor is provided, the non-zero positions will be ignored while the zero positions will be unchanged. If a BoolTensor is provided, the positions with the value of True will be ignored while the position with the value of False will be unchanged. output: (T, N, E) Note: Due to the multi-head attention architecture in the transformer model, the output sequence length of a transformer is same as the input sequence (i.e. target) length of the decode. where S is the source sequence length, T is the target sequence length, N is the batch size, E is the feature number. virtual void reset() override# reset() must perform initialization of all members with reference semantics, most importantly parameters, buffers and submodules. void reset_parameters()# Public Members TransformerOptions options# options with which this Transformer was constructed AnyModule encoder# encoder module AnyModule decoder# decoder module Public Static Functions static Tensor generate_square_subsequent_mask(int64_t sz)# Generate a square mask for the sequence. The masked positions are filled with -inf in float type. Unmasked positions are filled with 0.0 in float type. Note: This function will always return a CPU tensor. This function requires the platform support IEEE754, since -inf is guaranteed to be valid only when IEEE754 is supported. If the platform doesn\u2019t support IEEE754, this function will fill the mask with the smallest float number instead of -inf, a one time warning will pop up as well. Friends friend struct torch::nn::AnyModuleHolder Example: auto transformer = torch::nn::Transformer( torch::nn::TransformerOptions() .d_model(512) .nhead(8) .num_encoder_layers(6) .num_decoder_layers(6) .dim_feedforward(2048) .dropout(0.1)); TransformerEncoder# Stack of encoder layers for processing source sequences. class TransformerEncoder : public torch::nn::ModuleHolder\u003cTransformerEncoderImpl\u003e# A ModuleHolder subclass for TransformerEncoderImpl. See the documentation for TransformerEncoderImpl class to learn what methods it provides, and examples of how to use TransformerEncoder with torch::nn::TransformerEncoderOptions. See the documentation for ModuleHolder to learn about PyTorch\u2019s module storage semantics. Public Types using Impl = TransformerEncoderImpl# class TransformerEncoderImpl : public torch::nn::Cloneable\u003cTransformerEncoderImpl\u003e# TransformerEncoder module. See https://pytorch.org/docs/main/generated/torch.nn.TransformerEncoder.html to learn about the exact behavior of this encoder layer module. See the documentation for torch::nn::TransformerEncoder class to learn what constructor arguments are supported for this encoder module. Example: TransformerEncoderLayer encoderLayer(TransformerEncoderLayerOptions(512, 8).dropout(0.1)); TransformerEncoder encoder(TransformerEncoderOptions(encoderLayer, 6).norm(LayerNorm(LayerNormOptions({2})))); Public Functions inline TransformerEncoderImpl(TransformerEncoderLayer encoder_layer, int64_t num_layers)# explicit TransformerEncoderImpl(TransformerEncoderOptions options_)# Tensor forward(const Tensor \u0026src, const Tensor \u0026src_mask = {}, const Tensor \u0026src_key_padding_mask = {})# virtual void reset() override# reset() must perform initialization of all members with reference semantics, most importantly parameters, buffers and submodules. void reset_parameters()# Public Members TransformerEncoderOptions options# options with which this TransformerEncoder was constructed ModuleList layers = nullptr# module list that contains all the encoder layers AnyModule norm# optional normalization module Friends friend struct torch::nn::AnyModuleHolder TransformerDecoder# Stack of decoder layers for generating target sequences. class TransformerDecoder : public torch::nn::ModuleHolder\u003cTransformerDecoderImpl\u003e# A ModuleHolder subclass for TransformerDecoderImpl. See the documentation for TransformerDecoderImpl class to learn what methods it provides, and examples of how to use TransformerDecoder with torch::nn::TransformerDecoderOptions. See the documentation for ModuleHolder to learn about PyTorch\u2019s module storage semantics. Public Types using Impl = TransformerDecoderImpl# class TransformerDecoderImpl : public torch::nn::Cloneable\u003cTransformerDecoderImpl\u003e# TransformerDecoder is a stack of N decoder layers. See https://pytorch.org/docs/main/generated/torch.nn.TransformerDecoder.html to learn about the exact behavior of this decoder module See the documentation for torch::nn::TransformerDecoderOptions class to learn what constructor arguments are supported for this decoder module Example: TransformerDecoderLayer decoder_layer(TransformerDecoderLayerOptions(512, 8).dropout(0.1)); TransformerDecoder transformer_decoder(TransformerDecoderOptions(decoder_layer, 6).norm(LayerNorm(LayerNormOptions({2})))); const auto memory = torch::rand({10, 32, 512}); const auto tgt = torch::rand({20, 32, 512}); auto out = transformer_decoder(tgt, memory); Public Functions inline TransformerDecoderImpl(TransformerDecoderLayer decoder_layer, int64_t num_layers)# explicit TransformerDecoderImpl(TransformerDecoderOptions options_)# virtual void reset() override# reset() must perform initialization of all members with reference semantics, most importantly parameters, buffers and submodules. void reset_parameters()# Tensor forward(const Tensor \u0026tgt, const Tensor \u0026memory, const Tensor \u0026tgt_mask = {}, const Tensor \u0026memory_mask = {}, const Tensor \u0026tgt_key_padding_mask = {}, const Tensor \u0026memory_key_padding_mask = {})# Pass the inputs (and mask) through the decoder layer in turn. Args: tgt: the sequence to the decoder layer (required). memory: the sequence from the last layer of the encoder (required). tgt_mask: the mask for the tgt sequence (optional). memory_mask: the mask for the memory sequence (optional). tgt_key_padding_mask: the mask for the tgt keys per batch (optional). memory_key_padding_mask: the mask for the memory keys per batch (optional). Public Members TransformerDecoderOptions options# The options used to configure this module. ModuleList layers = {nullptr}# Cloned layers of decoder layers. AnyModule norm# optional layer normalization module Friends friend struct torch::nn::AnyModuleHolder TransformerEncoderLayer# Single encoder layer with self-attention and feedforward network. class TransformerEncoderLayerImpl : public torch::nn::Cloneable\u003cTransformerEncoderLayerImpl\u003e# TransformerEncoderLayer module. See https://pytorch.org/docs/main/generated/torch.nn.TransformerEncoderLayer.html to learn about the exact behavior of this encoder layer model See the documentation for torch::nn::TransformerEncoderLayer class to learn what constructor arguments are supported for this encoder layer model Example: TransformerEncoderLayer encoderLayer(TransformerEncoderLayerOptions(512, 8).dropout(0.1)); Public Functions inline TransformerEncoderLayerImpl(int64_t d_model, int64_t nhead)# explicit TransformerEncoderLayerImpl(TransformerEncoderLayerOptions options_)# Tensor forward(const Tensor \u0026src, const Tensor \u0026src_mask = {}, const Tensor \u0026src_key_padding_mask = {})# virtual void reset() override# reset() must perform initialization of all members with reference semantics, most importantly parameters, buffers and submodules. void reset_parameters()# Public Members TransformerEncoderLayerOptions options# options with which this TransformerEncoderLayer was constructed MultiheadAttention self_attn = nullptr# self attention Linear linear1 = nullptr# feedforward first linear layer Dropout dropout = nullptr# feedforward dropout layer Linear linear2 = nullptr# feedforward second linear layer LayerNorm norm1 = nullptr# pre feedforward, normalization layer LayerNorm norm2 = nullptr# post feedforward, normalization layer Dropout dropout1 = nullptr# pre feedforward, dropout layer Dropout dropout2 = nullptr# post feedforward, dropout layer Friends friend struct torch::nn::AnyModuleHolder TransformerDecoderLayer# Single decoder layer with self-attention, cross-attention, and feedforward network. Warning doxygenclass: Cannot find class \u201cTransformerDecoderLayerImpl\u201d in doxygen xml output for project \u201cPyTorch\u201d from directory: ../build/xml MultiheadAttention# Scaled dot-product attention with multiple parallel heads. class MultiheadAttention : public torch::nn::ModuleHolder\u003cMultiheadAttentionImpl\u003e# A ModuleHolder subclass for MultiheadAttentionImpl. See the documentation for MultiheadAttentionImpl class to learn what methods it provides, and examples of how to use MultiheadAttention with torch::nn::MultiheadAttentionOptions. See the documentation for ModuleHolder to learn about PyTorch\u2019s module storage semantics. Public Types using Impl = MultiheadAttentionImpl# class MultiheadAttentionImpl : public torch::nn::Cloneable\u003cMultiheadAttentionImpl\u003e# Applies the MultiheadAttention function element-wise. See https://pytorch.org/docs/main/nn.html#torch.nn.MultiheadAttention to learn about the exact behavior of this module. See the documentation for torch::nn::MultiheadAttentionOptions class to learn what constructor arguments are supported for this module. Example: MultiheadAttention model(MultiheadAttentionOptions(20, 10).bias(false)); Public Functions inline MultiheadAttentionImpl(int64_t embed_dim, int64_t num_heads)# explicit MultiheadAttentionImpl(const MultiheadAttentionOptions \u0026options_)# std::tuple\u003cTensor, Tensor\u003e forward(const Tensor \u0026query, const Tensor \u0026key, const Tensor \u0026value, const Tensor \u0026key_padding_mask = {}, bool need_weights = true, const Tensor \u0026attn_mask = {}, bool average_attn_weights = true)# virtual void reset() override# reset() must perform initialization of all members with reference semantics, most importantly parameters, buffers and submodules. void _reset_parameters()# Public Members MultiheadAttentionOptions options# The options with which this Module was constructed. bool _qkv_same_embed_dim = {}# Tensor in_proj_weight# Tensor in_proj_bias# Tensor bias_k# Tensor bias_v# Linear out_proj = nullptr# Tensor q_proj_weight# Tensor k_proj_weight# Tensor v_proj_weight# int64_t head_dim = {}# Friends friend struct torch::nn::AnyModuleHolder",
       "author": {
         "@type": "Organization",
         "name": "PyTorch Contributors",
         "url": "https://pytorch.org"
       },
       "image": "https://pytorch.org/docs/stable/_static/img/pytorch_seo.png",
       "mainEntityOfPage": {
         "@type": "WebPage",
         "@id": "/api/nn/transformer.html"
       },
       "datePublished": "2023-01-01T00:00:00Z",
       "dateModified": "2023-01-01T00:00:00Z"
     }
 

docsearch:languageen
llm:site-typedocumentation
llm:frameworkPyTorch
llm:descriptionTransformer layers in PyTorch C++ — Transformer, TransformerEncoder, TransformerDecoder, and MultiheadAttention.
llm:navigation-filehttps://pytorch.org/docs/stable/llms.txt
llm:sitemaphttps://pytorch.org/docs/stable/sitemap.xml
llm:versionmain
llm:projectPyTorch
llm:page-typedocumentation
og:imagehttps://docs.pytorch.org/docs/stable/_static/img/pytorch_seo.png
None3

Links:

Skip to main contenthttps://docs.pytorch.org/cppdocs/api/nn/transformer.html#main-content
Home https://docs.pytorch.org/cppdocs/index.html
mainhttps://docs.pytorch.org/cppdocs/index.html
Installing C++ Distributions of PyTorch https://docs.pytorch.org/cppdocs/installing.html
The C++ Frontend https://docs.pytorch.org/cppdocs/frontend.html
C++ API Reference https://docs.pytorch.org/cppdocs/api/index.html
ATen: Tensor Library https://docs.pytorch.org/cppdocs/api/aten/index.html
C10: Core Utilities https://docs.pytorch.org/cppdocs/api/c10/index.html
Autograd: Automatic Differentiation https://docs.pytorch.org/cppdocs/api/autograd/index.html
CUDA Support https://docs.pytorch.org/cppdocs/api/cuda/index.html
XPU Support https://docs.pytorch.org/cppdocs/api/xpu/index.html
Neural Network Modules (torch::nn) https://docs.pytorch.org/cppdocs/api/nn/index.html
Optimizers (torch::optim) https://docs.pytorch.org/cppdocs/api/optim/index.html
Data Loading (torch::data) https://docs.pytorch.org/cppdocs/api/data/index.html
Serialization (torch::serialize) https://docs.pytorch.org/cppdocs/api/serialize/index.html
Torch Library API https://docs.pytorch.org/cppdocs/api/library/index.html
Torch Stable API https://docs.pytorch.org/cppdocs/api/stable/index.html
FAQ https://docs.pytorch.org/cppdocs/faq.html
Go to pytorch.org https://pytorch.org
Xhttps://x.com/PyTorch
GitHubhttps://github.com/pytorch/pytorch
PyTorch Forumhttps://discuss.pytorch.org/
PyPihttps://pypi.org/project/torch/
mainhttps://docs.pytorch.org/cppdocs/index.html
Installing C++ Distributions of PyTorch https://docs.pytorch.org/cppdocs/installing.html
The C++ Frontend https://docs.pytorch.org/cppdocs/frontend.html
C++ API Reference https://docs.pytorch.org/cppdocs/api/index.html
ATen: Tensor Library https://docs.pytorch.org/cppdocs/api/aten/index.html
C10: Core Utilities https://docs.pytorch.org/cppdocs/api/c10/index.html
Autograd: Automatic Differentiation https://docs.pytorch.org/cppdocs/api/autograd/index.html
CUDA Support https://docs.pytorch.org/cppdocs/api/cuda/index.html
XPU Support https://docs.pytorch.org/cppdocs/api/xpu/index.html
Neural Network Modules (torch::nn) https://docs.pytorch.org/cppdocs/api/nn/index.html
Optimizers (torch::optim) https://docs.pytorch.org/cppdocs/api/optim/index.html
Data Loading (torch::data) https://docs.pytorch.org/cppdocs/api/data/index.html
Serialization (torch::serialize) https://docs.pytorch.org/cppdocs/api/serialize/index.html
Torch Library API https://docs.pytorch.org/cppdocs/api/library/index.html
Torch Stable API https://docs.pytorch.org/cppdocs/api/stable/index.html
FAQ https://docs.pytorch.org/cppdocs/faq.html
Go to pytorch.org https://pytorch.org
Xhttps://x.com/PyTorch
GitHubhttps://github.com/pytorch/pytorch
PyTorch Forumhttps://discuss.pytorch.org/
PyPihttps://pypi.org/project/torch/
ATen: Tensor Libraryhttps://docs.pytorch.org/cppdocs/api/aten/index.html
Tensor Classhttps://docs.pytorch.org/cppdocs/api/aten/tensor.html
Tensor Creationhttps://docs.pytorch.org/cppdocs/api/aten/creation.html
Tensor Indexinghttps://docs.pytorch.org/cppdocs/api/aten/indexing.html
Tensor Accessorshttps://docs.pytorch.org/cppdocs/api/aten/accessors.html
C10: Core Utilitieshttps://docs.pytorch.org/cppdocs/api/c10/index.html
Device and DeviceTypehttps://docs.pytorch.org/cppdocs/api/c10/device.html
Device Guardshttps://docs.pytorch.org/cppdocs/api/c10/guards.html
Streamshttps://docs.pytorch.org/cppdocs/api/c10/streams.html
Core Typeshttps://docs.pytorch.org/cppdocs/api/c10/types.html
Utilitieshttps://docs.pytorch.org/cppdocs/api/c10/utilities.html
Autograd: Automatic Differentiationhttps://docs.pytorch.org/cppdocs/api/autograd/index.html
Gradient Computationhttps://docs.pytorch.org/cppdocs/api/autograd/gradient.html
Custom Autograd Functionshttps://docs.pytorch.org/cppdocs/api/autograd/custom_functions.html
Gradient Modeshttps://docs.pytorch.org/cppdocs/api/autograd/modes.html
CUDA Supporthttps://docs.pytorch.org/cppdocs/api/cuda/index.html
CUDA Streamshttps://docs.pytorch.org/cppdocs/api/cuda/streams.html
CUDA Guardshttps://docs.pytorch.org/cppdocs/api/cuda/guards.html
CUDA Utility Functionshttps://docs.pytorch.org/cppdocs/api/cuda/utilities.html
XPU Supporthttps://docs.pytorch.org/cppdocs/api/xpu/index.html
XPU Streamshttps://docs.pytorch.org/cppdocs/api/xpu/streams.html
XPU Utility Functionshttps://docs.pytorch.org/cppdocs/api/xpu/utilities.html
Neural Network Modules (torch::nn)https://docs.pytorch.org/cppdocs/api/nn/index.html
Containershttps://docs.pytorch.org/cppdocs/api/nn/containers.html
Convolution Layershttps://docs.pytorch.org/cppdocs/api/nn/convolution.html
Pooling Layershttps://docs.pytorch.org/cppdocs/api/nn/pooling.html
Linear Layershttps://docs.pytorch.org/cppdocs/api/nn/linear.html
Activation Functionshttps://docs.pytorch.org/cppdocs/api/nn/activation.html
Normalization Layershttps://docs.pytorch.org/cppdocs/api/nn/normalization.html
Dropout Layershttps://docs.pytorch.org/cppdocs/api/nn/dropout.html
Embedding Layershttps://docs.pytorch.org/cppdocs/api/nn/embedding.html
Recurrent Layershttps://docs.pytorch.org/cppdocs/api/nn/recurrent.html
Transformer Layershttps://docs.pytorch.org/cppdocs/api/nn/transformer.html
Loss Functionshttps://docs.pytorch.org/cppdocs/api/nn/loss.html
Functional APIhttps://docs.pytorch.org/cppdocs/api/nn/functional.html
Utilitieshttps://docs.pytorch.org/cppdocs/api/nn/utilities.html
Optimizers (torch::optim)https://docs.pytorch.org/cppdocs/api/optim/index.html
Gradient Descent Optimizershttps://docs.pytorch.org/cppdocs/api/optim/gradient_descent.html
Adaptive Learning Rate Optimizershttps://docs.pytorch.org/cppdocs/api/optim/adaptive.html
Second-Order Optimizershttps://docs.pytorch.org/cppdocs/api/optim/second_order.html
Learning Rate Schedulershttps://docs.pytorch.org/cppdocs/api/optim/schedulers.html
Data Loading (torch::data)https://docs.pytorch.org/cppdocs/api/data/index.html
Datasetshttps://docs.pytorch.org/cppdocs/api/data/datasets.html
DataLoaderhttps://docs.pytorch.org/cppdocs/api/data/dataloader.html
Samplershttps://docs.pytorch.org/cppdocs/api/data/samplers.html
Transformshttps://docs.pytorch.org/cppdocs/api/data/transforms.html
Serialization (torch::serialize)https://docs.pytorch.org/cppdocs/api/serialize/index.html
Saving and Loadinghttps://docs.pytorch.org/cppdocs/api/serialize/save_load.html
Archiveshttps://docs.pytorch.org/cppdocs/api/serialize/archives.html
Checkpointshttps://docs.pytorch.org/cppdocs/api/serialize/checkpoints.html
Torch Library APIhttps://docs.pytorch.org/cppdocs/api/library/index.html
Operator Registrationhttps://docs.pytorch.org/cppdocs/api/library/registration.html
Custom Classeshttps://docs.pytorch.org/cppdocs/api/library/custom_classes.html
Library Versioninghttps://docs.pytorch.org/cppdocs/api/library/versioning.html
Torch Stable APIhttps://docs.pytorch.org/cppdocs/api/stable/index.html
Library Registration Macroshttps://docs.pytorch.org/cppdocs/api/stable/registration.html
Stable Operatorshttps://docs.pytorch.org/cppdocs/api/stable/operators.html
Utilitieshttps://docs.pytorch.org/cppdocs/api/stable/utilities.html
https://docs.pytorch.org/cppdocs/index.html
C++ API Referencehttps://docs.pytorch.org/cppdocs/api/index.html
Neural Network Modules (torch::nn)https://docs.pytorch.org/cppdocs/api/nn/index.html
#https://docs.pytorch.org/cppdocs/api/nn/transformer.html#transformer-layers
#https://docs.pytorch.org/cppdocs/api/nn/transformer.html#transformer
ModuleHolderhttps://docs.pytorch.org/cppdocs/api/nn/utilities.html#_CPPv4I0EN5torch2nn12ModuleHolderE
TransformerImplhttps://docs.pytorch.org/cppdocs/api/nn/transformer.html#_CPPv4N5torch2nn15TransformerImplE
#https://docs.pytorch.org/cppdocs/api/nn/transformer.html#_CPPv4N5torch2nn11TransformerE
ModuleHolderhttps://docs.pytorch.org/cppdocs/api/nn/utilities.html#PyTorchclasstorch_1_1nn_1_1_module_holder
TransformerImplhttps://docs.pytorch.org/cppdocs/api/nn/transformer.html#PyTorchclasstorch_1_1nn_1_1_transformer_impl
TransformerImplhttps://docs.pytorch.org/cppdocs/api/nn/transformer.html#PyTorchclasstorch_1_1nn_1_1_transformer_impl
Transformerhttps://docs.pytorch.org/cppdocs/api/nn/transformer.html#PyTorchclasstorch_1_1nn_1_1_transformer
ModuleHolderhttps://docs.pytorch.org/cppdocs/api/nn/utilities.html#PyTorchclasstorch_1_1nn_1_1_module_holder
TransformerImplhttps://docs.pytorch.org/cppdocs/api/nn/transformer.html#_CPPv4N5torch2nn15TransformerImplE
#https://docs.pytorch.org/cppdocs/api/nn/transformer.html#_CPPv4N5torch2nn11Transformer4ImplE
Cloneablehttps://docs.pytorch.org/cppdocs/api/nn/utilities.html#_CPPv4I0EN5torch2nn9CloneableE
TransformerImplhttps://docs.pytorch.org/cppdocs/api/nn/transformer.html#_CPPv4N5torch2nn15TransformerImplE
#https://docs.pytorch.org/cppdocs/api/nn/transformer.html#_CPPv4N5torch2nn15TransformerImplE
https://pytorch.org/docs/stable/generated/torch.nn.Transformer.htmlhttps://pytorch.org/docs/stable/generated/torch.nn.Transformer.html
torch::nn::Transformerhttps://docs.pytorch.org/cppdocs/api/nn/transformer.html#PyTorchclasstorch_1_1nn_1_1_transformer
#https://docs.pytorch.org/cppdocs/api/nn/transformer.html#_CPPv4N5torch2nn15TransformerImpl15TransformerImplE18TransformerOptions
Tensorhttps://docs.pytorch.org/cppdocs/api/aten/tensor.html#_CPPv46Tensorv
Tensorhttps://docs.pytorch.org/cppdocs/api/aten/tensor.html#_CPPv46Tensorv
Tensorhttps://docs.pytorch.org/cppdocs/api/aten/tensor.html#_CPPv46Tensorv
Tensorhttps://docs.pytorch.org/cppdocs/api/aten/tensor.html#_CPPv46Tensorv
Tensorhttps://docs.pytorch.org/cppdocs/api/aten/tensor.html#_CPPv46Tensorv
Tensorhttps://docs.pytorch.org/cppdocs/api/aten/tensor.html#_CPPv46Tensorv
Tensorhttps://docs.pytorch.org/cppdocs/api/aten/tensor.html#_CPPv46Tensorv
Tensorhttps://docs.pytorch.org/cppdocs/api/aten/tensor.html#_CPPv46Tensorv
Tensorhttps://docs.pytorch.org/cppdocs/api/aten/tensor.html#_CPPv46Tensorv
#https://docs.pytorch.org/cppdocs/api/nn/transformer.html#_CPPv4N5torch2nn15TransformerImpl7forwardERK6TensorRK6TensorRK6TensorRK6TensorRK6TensorRK6TensorRK6TensorRK6Tensor
Transformerhttps://docs.pytorch.org/cppdocs/api/nn/transformer.html#PyTorchclasstorch_1_1nn_1_1_transformer
Modulehttps://docs.pytorch.org/cppdocs/api/nn/index.html#PyTorchclasstorch_1_1nn_1_1_module
#https://docs.pytorch.org/cppdocs/api/nn/transformer.html#_CPPv4N5torch2nn15TransformerImpl5resetEv
reset()https://docs.pytorch.org/cppdocs/api/nn/transformer.html#PyTorchclasstorch_1_1nn_1_1_transformer_impl_1ac32939b12ab3d2d87b671add946b8bb4
#https://docs.pytorch.org/cppdocs/api/nn/transformer.html#_CPPv4N5torch2nn15TransformerImpl16reset_parametersEv
#https://docs.pytorch.org/cppdocs/api/nn/transformer.html#_CPPv4N5torch2nn15TransformerImpl7optionsE
Transformerhttps://docs.pytorch.org/cppdocs/api/nn/transformer.html#PyTorchclasstorch_1_1nn_1_1_transformer
AnyModulehttps://docs.pytorch.org/cppdocs/api/nn/utilities.html#_CPPv4N5torch2nn9AnyModuleE
#https://docs.pytorch.org/cppdocs/api/nn/transformer.html#_CPPv4N5torch2nn15TransformerImpl7encoderE
AnyModulehttps://docs.pytorch.org/cppdocs/api/nn/utilities.html#_CPPv4N5torch2nn9AnyModuleE
#https://docs.pytorch.org/cppdocs/api/nn/transformer.html#_CPPv4N5torch2nn15TransformerImpl7decoderE
Tensorhttps://docs.pytorch.org/cppdocs/api/aten/tensor.html#_CPPv46Tensorv
#https://docs.pytorch.org/cppdocs/api/nn/transformer.html#_CPPv4N5torch2nn15TransformerImpl31generate_square_subsequent_maskE7int64_t
#https://docs.pytorch.org/cppdocs/api/nn/transformer.html#transformerencoder
ModuleHolderhttps://docs.pytorch.org/cppdocs/api/nn/utilities.html#_CPPv4I0EN5torch2nn12ModuleHolderE
TransformerEncoderImplhttps://docs.pytorch.org/cppdocs/api/nn/transformer.html#_CPPv4N5torch2nn22TransformerEncoderImplE
#https://docs.pytorch.org/cppdocs/api/nn/transformer.html#_CPPv4N5torch2nn18TransformerEncoderE
ModuleHolderhttps://docs.pytorch.org/cppdocs/api/nn/utilities.html#PyTorchclasstorch_1_1nn_1_1_module_holder
TransformerEncoderImplhttps://docs.pytorch.org/cppdocs/api/nn/transformer.html#PyTorchclasstorch_1_1nn_1_1_transformer_encoder_impl
TransformerEncoderImplhttps://docs.pytorch.org/cppdocs/api/nn/transformer.html#PyTorchclasstorch_1_1nn_1_1_transformer_encoder_impl
TransformerEncoderhttps://docs.pytorch.org/cppdocs/api/nn/transformer.html#PyTorchclasstorch_1_1nn_1_1_transformer_encoder
ModuleHolderhttps://docs.pytorch.org/cppdocs/api/nn/utilities.html#PyTorchclasstorch_1_1nn_1_1_module_holder
TransformerEncoderImplhttps://docs.pytorch.org/cppdocs/api/nn/transformer.html#_CPPv4N5torch2nn22TransformerEncoderImplE
#https://docs.pytorch.org/cppdocs/api/nn/transformer.html#_CPPv4N5torch2nn18TransformerEncoder4ImplE
Cloneablehttps://docs.pytorch.org/cppdocs/api/nn/utilities.html#_CPPv4I0EN5torch2nn9CloneableE
TransformerEncoderImplhttps://docs.pytorch.org/cppdocs/api/nn/transformer.html#_CPPv4N5torch2nn22TransformerEncoderImplE
#https://docs.pytorch.org/cppdocs/api/nn/transformer.html#_CPPv4N5torch2nn22TransformerEncoderImplE
TransformerEncoderhttps://docs.pytorch.org/cppdocs/api/nn/transformer.html#PyTorchclasstorch_1_1nn_1_1_transformer_encoder
https://pytorch.org/docs/main/generated/torch.nn.TransformerEncoder.htmlhttps://pytorch.org/docs/main/generated/torch.nn.TransformerEncoder.html
torch::nn::TransformerEncoderhttps://docs.pytorch.org/cppdocs/api/nn/transformer.html#PyTorchclasstorch_1_1nn_1_1_transformer_encoder
#https://docs.pytorch.org/cppdocs/api/nn/transformer.html#_CPPv4N5torch2nn22TransformerEncoderImpl22TransformerEncoderImplE23TransformerEncoderLayer7int64_t
#https://docs.pytorch.org/cppdocs/api/nn/transformer.html#_CPPv4N5torch2nn22TransformerEncoderImpl22TransformerEncoderImplE25TransformerEncoderOptions
Tensorhttps://docs.pytorch.org/cppdocs/api/aten/tensor.html#_CPPv46Tensorv
Tensorhttps://docs.pytorch.org/cppdocs/api/aten/tensor.html#_CPPv46Tensorv
Tensorhttps://docs.pytorch.org/cppdocs/api/aten/tensor.html#_CPPv46Tensorv
Tensorhttps://docs.pytorch.org/cppdocs/api/aten/tensor.html#_CPPv46Tensorv
#https://docs.pytorch.org/cppdocs/api/nn/transformer.html#_CPPv4N5torch2nn22TransformerEncoderImpl7forwardERK6TensorRK6TensorRK6Tensor
#https://docs.pytorch.org/cppdocs/api/nn/transformer.html#_CPPv4N5torch2nn22TransformerEncoderImpl5resetEv
reset()https://docs.pytorch.org/cppdocs/api/nn/transformer.html#PyTorchclasstorch_1_1nn_1_1_transformer_encoder_impl_1af14c96145cca42da44c868aaa9437d38
#https://docs.pytorch.org/cppdocs/api/nn/transformer.html#_CPPv4N5torch2nn22TransformerEncoderImpl16reset_parametersEv
#https://docs.pytorch.org/cppdocs/api/nn/transformer.html#_CPPv4N5torch2nn22TransformerEncoderImpl7optionsE
TransformerEncoderhttps://docs.pytorch.org/cppdocs/api/nn/transformer.html#PyTorchclasstorch_1_1nn_1_1_transformer_encoder
ModuleListhttps://docs.pytorch.org/cppdocs/api/nn/containers.html#_CPPv4N5torch2nn10ModuleListE
#https://docs.pytorch.org/cppdocs/api/nn/transformer.html#_CPPv4N5torch2nn22TransformerEncoderImpl6layersE
AnyModulehttps://docs.pytorch.org/cppdocs/api/nn/utilities.html#_CPPv4N5torch2nn9AnyModuleE
#https://docs.pytorch.org/cppdocs/api/nn/transformer.html#_CPPv4N5torch2nn22TransformerEncoderImpl4normE
#https://docs.pytorch.org/cppdocs/api/nn/transformer.html#transformerdecoder
ModuleHolderhttps://docs.pytorch.org/cppdocs/api/nn/utilities.html#_CPPv4I0EN5torch2nn12ModuleHolderE
TransformerDecoderImplhttps://docs.pytorch.org/cppdocs/api/nn/transformer.html#_CPPv4N5torch2nn22TransformerDecoderImplE
#https://docs.pytorch.org/cppdocs/api/nn/transformer.html#_CPPv4N5torch2nn18TransformerDecoderE
ModuleHolderhttps://docs.pytorch.org/cppdocs/api/nn/utilities.html#PyTorchclasstorch_1_1nn_1_1_module_holder
TransformerDecoderImplhttps://docs.pytorch.org/cppdocs/api/nn/transformer.html#PyTorchclasstorch_1_1nn_1_1_transformer_decoder_impl
TransformerDecoderImplhttps://docs.pytorch.org/cppdocs/api/nn/transformer.html#PyTorchclasstorch_1_1nn_1_1_transformer_decoder_impl
TransformerDecoderhttps://docs.pytorch.org/cppdocs/api/nn/transformer.html#PyTorchclasstorch_1_1nn_1_1_transformer_decoder
ModuleHolderhttps://docs.pytorch.org/cppdocs/api/nn/utilities.html#PyTorchclasstorch_1_1nn_1_1_module_holder
TransformerDecoderImplhttps://docs.pytorch.org/cppdocs/api/nn/transformer.html#_CPPv4N5torch2nn22TransformerDecoderImplE
#https://docs.pytorch.org/cppdocs/api/nn/transformer.html#_CPPv4N5torch2nn18TransformerDecoder4ImplE
Cloneablehttps://docs.pytorch.org/cppdocs/api/nn/utilities.html#_CPPv4I0EN5torch2nn9CloneableE
TransformerDecoderImplhttps://docs.pytorch.org/cppdocs/api/nn/transformer.html#_CPPv4N5torch2nn22TransformerDecoderImplE
#https://docs.pytorch.org/cppdocs/api/nn/transformer.html#_CPPv4N5torch2nn22TransformerDecoderImplE
TransformerDecoderhttps://docs.pytorch.org/cppdocs/api/nn/transformer.html#PyTorchclasstorch_1_1nn_1_1_transformer_decoder
https://pytorch.org/docs/main/generated/torch.nn.TransformerDecoder.htmlhttps://pytorch.org/docs/main/generated/torch.nn.TransformerDecoder.html
#https://docs.pytorch.org/cppdocs/api/nn/transformer.html#_CPPv4N5torch2nn22TransformerDecoderImpl22TransformerDecoderImplE23TransformerDecoderLayer7int64_t
#https://docs.pytorch.org/cppdocs/api/nn/transformer.html#_CPPv4N5torch2nn22TransformerDecoderImpl22TransformerDecoderImplE25TransformerDecoderOptions
#https://docs.pytorch.org/cppdocs/api/nn/transformer.html#_CPPv4N5torch2nn22TransformerDecoderImpl5resetEv
reset()https://docs.pytorch.org/cppdocs/api/nn/transformer.html#PyTorchclasstorch_1_1nn_1_1_transformer_decoder_impl_1a9759a4df815905c95473b5ad41e5b0d1
#https://docs.pytorch.org/cppdocs/api/nn/transformer.html#_CPPv4N5torch2nn22TransformerDecoderImpl16reset_parametersEv
Tensorhttps://docs.pytorch.org/cppdocs/api/aten/tensor.html#_CPPv46Tensorv
Tensorhttps://docs.pytorch.org/cppdocs/api/aten/tensor.html#_CPPv46Tensorv
Tensorhttps://docs.pytorch.org/cppdocs/api/aten/tensor.html#_CPPv46Tensorv
Tensorhttps://docs.pytorch.org/cppdocs/api/aten/tensor.html#_CPPv46Tensorv
Tensorhttps://docs.pytorch.org/cppdocs/api/aten/tensor.html#_CPPv46Tensorv
Tensorhttps://docs.pytorch.org/cppdocs/api/aten/tensor.html#_CPPv46Tensorv
Tensorhttps://docs.pytorch.org/cppdocs/api/aten/tensor.html#_CPPv46Tensorv
#https://docs.pytorch.org/cppdocs/api/nn/transformer.html#_CPPv4N5torch2nn22TransformerDecoderImpl7forwardERK6TensorRK6TensorRK6TensorRK6TensorRK6TensorRK6Tensor
#https://docs.pytorch.org/cppdocs/api/nn/transformer.html#_CPPv4N5torch2nn22TransformerDecoderImpl7optionsE
ModuleListhttps://docs.pytorch.org/cppdocs/api/nn/containers.html#_CPPv4N5torch2nn10ModuleListE
#https://docs.pytorch.org/cppdocs/api/nn/transformer.html#_CPPv4N5torch2nn22TransformerDecoderImpl6layersE
AnyModulehttps://docs.pytorch.org/cppdocs/api/nn/utilities.html#_CPPv4N5torch2nn9AnyModuleE
#https://docs.pytorch.org/cppdocs/api/nn/transformer.html#_CPPv4N5torch2nn22TransformerDecoderImpl4normE
#https://docs.pytorch.org/cppdocs/api/nn/transformer.html#transformerencoderlayer
Cloneablehttps://docs.pytorch.org/cppdocs/api/nn/utilities.html#_CPPv4I0EN5torch2nn9CloneableE
TransformerEncoderLayerImplhttps://docs.pytorch.org/cppdocs/api/nn/transformer.html#_CPPv4N5torch2nn27TransformerEncoderLayerImplE
#https://docs.pytorch.org/cppdocs/api/nn/transformer.html#_CPPv4N5torch2nn27TransformerEncoderLayerImplE
https://pytorch.org/docs/main/generated/torch.nn.TransformerEncoderLayer.htmlhttps://pytorch.org/docs/main/generated/torch.nn.TransformerEncoderLayer.html
#https://docs.pytorch.org/cppdocs/api/nn/transformer.html#_CPPv4N5torch2nn27TransformerEncoderLayerImpl27TransformerEncoderLayerImplE7int64_t7int64_t
#https://docs.pytorch.org/cppdocs/api/nn/transformer.html#_CPPv4N5torch2nn27TransformerEncoderLayerImpl27TransformerEncoderLayerImplE30TransformerEncoderLayerOptions
Tensorhttps://docs.pytorch.org/cppdocs/api/aten/tensor.html#_CPPv46Tensorv
Tensorhttps://docs.pytorch.org/cppdocs/api/aten/tensor.html#_CPPv46Tensorv
Tensorhttps://docs.pytorch.org/cppdocs/api/aten/tensor.html#_CPPv46Tensorv
Tensorhttps://docs.pytorch.org/cppdocs/api/aten/tensor.html#_CPPv46Tensorv
#https://docs.pytorch.org/cppdocs/api/nn/transformer.html#_CPPv4N5torch2nn27TransformerEncoderLayerImpl7forwardERK6TensorRK6TensorRK6Tensor
#https://docs.pytorch.org/cppdocs/api/nn/transformer.html#_CPPv4N5torch2nn27TransformerEncoderLayerImpl5resetEv
reset()https://docs.pytorch.org/cppdocs/api/nn/transformer.html#PyTorchclasstorch_1_1nn_1_1_transformer_encoder_layer_impl_1a891347c3c450e2f064b7877f618f5163
#https://docs.pytorch.org/cppdocs/api/nn/transformer.html#_CPPv4N5torch2nn27TransformerEncoderLayerImpl16reset_parametersEv
#https://docs.pytorch.org/cppdocs/api/nn/transformer.html#_CPPv4N5torch2nn27TransformerEncoderLayerImpl7optionsE
MultiheadAttentionhttps://docs.pytorch.org/cppdocs/api/nn/transformer.html#_CPPv4N5torch2nn18MultiheadAttentionE
#https://docs.pytorch.org/cppdocs/api/nn/transformer.html#_CPPv4N5torch2nn27TransformerEncoderLayerImpl9self_attnE
Linearhttps://docs.pytorch.org/cppdocs/api/nn/linear.html#_CPPv4N5torch2nn6LinearE
#https://docs.pytorch.org/cppdocs/api/nn/transformer.html#_CPPv4N5torch2nn27TransformerEncoderLayerImpl7linear1E
Dropouthttps://docs.pytorch.org/cppdocs/api/nn/dropout.html#_CPPv4N5torch2nn7DropoutE
#https://docs.pytorch.org/cppdocs/api/nn/transformer.html#_CPPv4N5torch2nn27TransformerEncoderLayerImpl7dropoutE
Linearhttps://docs.pytorch.org/cppdocs/api/nn/linear.html#_CPPv4N5torch2nn6LinearE
#https://docs.pytorch.org/cppdocs/api/nn/transformer.html#_CPPv4N5torch2nn27TransformerEncoderLayerImpl7linear2E
LayerNormhttps://docs.pytorch.org/cppdocs/api/nn/normalization.html#_CPPv4N5torch2nn9LayerNormE
#https://docs.pytorch.org/cppdocs/api/nn/transformer.html#_CPPv4N5torch2nn27TransformerEncoderLayerImpl5norm1E
LayerNormhttps://docs.pytorch.org/cppdocs/api/nn/normalization.html#_CPPv4N5torch2nn9LayerNormE
#https://docs.pytorch.org/cppdocs/api/nn/transformer.html#_CPPv4N5torch2nn27TransformerEncoderLayerImpl5norm2E
Dropouthttps://docs.pytorch.org/cppdocs/api/nn/dropout.html#_CPPv4N5torch2nn7DropoutE
#https://docs.pytorch.org/cppdocs/api/nn/transformer.html#_CPPv4N5torch2nn27TransformerEncoderLayerImpl8dropout1E
Dropouthttps://docs.pytorch.org/cppdocs/api/nn/dropout.html#_CPPv4N5torch2nn7DropoutE
#https://docs.pytorch.org/cppdocs/api/nn/transformer.html#_CPPv4N5torch2nn27TransformerEncoderLayerImpl8dropout2E
#https://docs.pytorch.org/cppdocs/api/nn/transformer.html#transformerdecoderlayer
#https://docs.pytorch.org/cppdocs/api/nn/transformer.html#multiheadattention
ModuleHolderhttps://docs.pytorch.org/cppdocs/api/nn/utilities.html#_CPPv4I0EN5torch2nn12ModuleHolderE
MultiheadAttentionImplhttps://docs.pytorch.org/cppdocs/api/nn/transformer.html#_CPPv4N5torch2nn22MultiheadAttentionImplE
#https://docs.pytorch.org/cppdocs/api/nn/transformer.html#_CPPv4N5torch2nn18MultiheadAttentionE
ModuleHolderhttps://docs.pytorch.org/cppdocs/api/nn/utilities.html#PyTorchclasstorch_1_1nn_1_1_module_holder
MultiheadAttentionImplhttps://docs.pytorch.org/cppdocs/api/nn/transformer.html#PyTorchclasstorch_1_1nn_1_1_multihead_attention_impl
MultiheadAttentionImplhttps://docs.pytorch.org/cppdocs/api/nn/transformer.html#PyTorchclasstorch_1_1nn_1_1_multihead_attention_impl
MultiheadAttentionhttps://docs.pytorch.org/cppdocs/api/nn/transformer.html#PyTorchclasstorch_1_1nn_1_1_multihead_attention
ModuleHolderhttps://docs.pytorch.org/cppdocs/api/nn/utilities.html#PyTorchclasstorch_1_1nn_1_1_module_holder
MultiheadAttentionImplhttps://docs.pytorch.org/cppdocs/api/nn/transformer.html#_CPPv4N5torch2nn22MultiheadAttentionImplE
#https://docs.pytorch.org/cppdocs/api/nn/transformer.html#_CPPv4N5torch2nn18MultiheadAttention4ImplE
Cloneablehttps://docs.pytorch.org/cppdocs/api/nn/utilities.html#_CPPv4I0EN5torch2nn9CloneableE
MultiheadAttentionImplhttps://docs.pytorch.org/cppdocs/api/nn/transformer.html#_CPPv4N5torch2nn22MultiheadAttentionImplE
#https://docs.pytorch.org/cppdocs/api/nn/transformer.html#_CPPv4N5torch2nn22MultiheadAttentionImplE
MultiheadAttentionhttps://docs.pytorch.org/cppdocs/api/nn/transformer.html#PyTorchclasstorch_1_1nn_1_1_multihead_attention
https://pytorch.org/docs/main/nn.html#torch.nn.MultiheadAttentionhttps://pytorch.org/docs/main/nn.html#torch.nn.MultiheadAttention
#https://docs.pytorch.org/cppdocs/api/nn/transformer.html#_CPPv4N5torch2nn22MultiheadAttentionImpl22MultiheadAttentionImplE7int64_t7int64_t
#https://docs.pytorch.org/cppdocs/api/nn/transformer.html#_CPPv4N5torch2nn22MultiheadAttentionImpl22MultiheadAttentionImplERK25MultiheadAttentionOptions
Tensorhttps://docs.pytorch.org/cppdocs/api/aten/tensor.html#_CPPv46Tensorv
Tensorhttps://docs.pytorch.org/cppdocs/api/aten/tensor.html#_CPPv46Tensorv
Tensorhttps://docs.pytorch.org/cppdocs/api/aten/tensor.html#_CPPv46Tensorv
Tensorhttps://docs.pytorch.org/cppdocs/api/aten/tensor.html#_CPPv46Tensorv
Tensorhttps://docs.pytorch.org/cppdocs/api/aten/tensor.html#_CPPv46Tensorv
Tensorhttps://docs.pytorch.org/cppdocs/api/aten/tensor.html#_CPPv46Tensorv
Tensorhttps://docs.pytorch.org/cppdocs/api/aten/tensor.html#_CPPv46Tensorv
#https://docs.pytorch.org/cppdocs/api/nn/transformer.html#_CPPv4N5torch2nn22MultiheadAttentionImpl7forwardERK6TensorRK6TensorRK6TensorRK6TensorbRK6Tensorb
#https://docs.pytorch.org/cppdocs/api/nn/transformer.html#_CPPv4N5torch2nn22MultiheadAttentionImpl5resetEv
reset()https://docs.pytorch.org/cppdocs/api/nn/transformer.html#PyTorchclasstorch_1_1nn_1_1_multihead_attention_impl_1a743b425238a6bbeafe8091b92a11765a
#https://docs.pytorch.org/cppdocs/api/nn/transformer.html#_CPPv4N5torch2nn22MultiheadAttentionImpl17_reset_parametersEv
#https://docs.pytorch.org/cppdocs/api/nn/transformer.html#_CPPv4N5torch2nn22MultiheadAttentionImpl7optionsE
Modulehttps://docs.pytorch.org/cppdocs/api/nn/index.html#PyTorchclasstorch_1_1nn_1_1_module
#https://docs.pytorch.org/cppdocs/api/nn/transformer.html#_CPPv4N5torch2nn22MultiheadAttentionImpl19_qkv_same_embed_dimE
Tensorhttps://docs.pytorch.org/cppdocs/api/aten/tensor.html#_CPPv46Tensorv
#https://docs.pytorch.org/cppdocs/api/nn/transformer.html#_CPPv4N5torch2nn22MultiheadAttentionImpl14in_proj_weightE
Tensorhttps://docs.pytorch.org/cppdocs/api/aten/tensor.html#_CPPv46Tensorv
#https://docs.pytorch.org/cppdocs/api/nn/transformer.html#_CPPv4N5torch2nn22MultiheadAttentionImpl12in_proj_biasE
Tensorhttps://docs.pytorch.org/cppdocs/api/aten/tensor.html#_CPPv46Tensorv
#https://docs.pytorch.org/cppdocs/api/nn/transformer.html#_CPPv4N5torch2nn22MultiheadAttentionImpl6bias_kE
Tensorhttps://docs.pytorch.org/cppdocs/api/aten/tensor.html#_CPPv46Tensorv
#https://docs.pytorch.org/cppdocs/api/nn/transformer.html#_CPPv4N5torch2nn22MultiheadAttentionImpl6bias_vE
Linearhttps://docs.pytorch.org/cppdocs/api/nn/linear.html#_CPPv4N5torch2nn6LinearE
#https://docs.pytorch.org/cppdocs/api/nn/transformer.html#_CPPv4N5torch2nn22MultiheadAttentionImpl8out_projE
Tensorhttps://docs.pytorch.org/cppdocs/api/aten/tensor.html#_CPPv46Tensorv
#https://docs.pytorch.org/cppdocs/api/nn/transformer.html#_CPPv4N5torch2nn22MultiheadAttentionImpl13q_proj_weightE
Tensorhttps://docs.pytorch.org/cppdocs/api/aten/tensor.html#_CPPv46Tensorv
#https://docs.pytorch.org/cppdocs/api/nn/transformer.html#_CPPv4N5torch2nn22MultiheadAttentionImpl13k_proj_weightE
Tensorhttps://docs.pytorch.org/cppdocs/api/aten/tensor.html#_CPPv46Tensorv
#https://docs.pytorch.org/cppdocs/api/nn/transformer.html#_CPPv4N5torch2nn22MultiheadAttentionImpl13v_proj_weightE
#https://docs.pytorch.org/cppdocs/api/nn/transformer.html#_CPPv4N5torch2nn22MultiheadAttentionImpl8head_dimE
previous Recurrent Layers https://docs.pytorch.org/cppdocs/api/nn/recurrent.html
next Loss Functions https://docs.pytorch.org/cppdocs/api/nn/loss.html
PyData Sphinx Themehttps://pydata-sphinx-theme.readthedocs.io/en/stable/index.html
previous Recurrent Layers https://docs.pytorch.org/cppdocs/api/nn/recurrent.html
next Loss Functions https://docs.pytorch.org/cppdocs/api/nn/loss.html
Transformerhttps://docs.pytorch.org/cppdocs/api/nn/transformer.html#transformer
torch::nn::Transformerhttps://docs.pytorch.org/cppdocs/api/nn/transformer.html#_CPPv4N5torch2nn11TransformerE
Implhttps://docs.pytorch.org/cppdocs/api/nn/transformer.html#_CPPv4N5torch2nn11Transformer4ImplE
torch::nn::TransformerImplhttps://docs.pytorch.org/cppdocs/api/nn/transformer.html#_CPPv4N5torch2nn15TransformerImplE
TransformerImpl()https://docs.pytorch.org/cppdocs/api/nn/transformer.html#_CPPv4N5torch2nn15TransformerImpl15TransformerImplE18TransformerOptions
forward()https://docs.pytorch.org/cppdocs/api/nn/transformer.html#_CPPv4N5torch2nn15TransformerImpl7forwardERK6TensorRK6TensorRK6TensorRK6TensorRK6TensorRK6TensorRK6TensorRK6Tensor
reset()https://docs.pytorch.org/cppdocs/api/nn/transformer.html#_CPPv4N5torch2nn15TransformerImpl5resetEv
reset_parameters()https://docs.pytorch.org/cppdocs/api/nn/transformer.html#_CPPv4N5torch2nn15TransformerImpl16reset_parametersEv
optionshttps://docs.pytorch.org/cppdocs/api/nn/transformer.html#_CPPv4N5torch2nn15TransformerImpl7optionsE
encoderhttps://docs.pytorch.org/cppdocs/api/nn/transformer.html#_CPPv4N5torch2nn15TransformerImpl7encoderE
decoderhttps://docs.pytorch.org/cppdocs/api/nn/transformer.html#_CPPv4N5torch2nn15TransformerImpl7decoderE
generate_square_subsequent_mask()https://docs.pytorch.org/cppdocs/api/nn/transformer.html#_CPPv4N5torch2nn15TransformerImpl31generate_square_subsequent_maskE7int64_t
TransformerEncoderhttps://docs.pytorch.org/cppdocs/api/nn/transformer.html#transformerencoder
torch::nn::TransformerEncoderhttps://docs.pytorch.org/cppdocs/api/nn/transformer.html#_CPPv4N5torch2nn18TransformerEncoderE
Implhttps://docs.pytorch.org/cppdocs/api/nn/transformer.html#_CPPv4N5torch2nn18TransformerEncoder4ImplE
torch::nn::TransformerEncoderImplhttps://docs.pytorch.org/cppdocs/api/nn/transformer.html#_CPPv4N5torch2nn22TransformerEncoderImplE
TransformerEncoderImpl()https://docs.pytorch.org/cppdocs/api/nn/transformer.html#_CPPv4N5torch2nn22TransformerEncoderImpl22TransformerEncoderImplE23TransformerEncoderLayer7int64_t
TransformerEncoderImpl()https://docs.pytorch.org/cppdocs/api/nn/transformer.html#_CPPv4N5torch2nn22TransformerEncoderImpl22TransformerEncoderImplE25TransformerEncoderOptions
forward()https://docs.pytorch.org/cppdocs/api/nn/transformer.html#_CPPv4N5torch2nn22TransformerEncoderImpl7forwardERK6TensorRK6TensorRK6Tensor
reset()https://docs.pytorch.org/cppdocs/api/nn/transformer.html#_CPPv4N5torch2nn22TransformerEncoderImpl5resetEv
reset_parameters()https://docs.pytorch.org/cppdocs/api/nn/transformer.html#_CPPv4N5torch2nn22TransformerEncoderImpl16reset_parametersEv
optionshttps://docs.pytorch.org/cppdocs/api/nn/transformer.html#_CPPv4N5torch2nn22TransformerEncoderImpl7optionsE
layershttps://docs.pytorch.org/cppdocs/api/nn/transformer.html#_CPPv4N5torch2nn22TransformerEncoderImpl6layersE
normhttps://docs.pytorch.org/cppdocs/api/nn/transformer.html#_CPPv4N5torch2nn22TransformerEncoderImpl4normE
TransformerDecoderhttps://docs.pytorch.org/cppdocs/api/nn/transformer.html#transformerdecoder
torch::nn::TransformerDecoderhttps://docs.pytorch.org/cppdocs/api/nn/transformer.html#_CPPv4N5torch2nn18TransformerDecoderE
Implhttps://docs.pytorch.org/cppdocs/api/nn/transformer.html#_CPPv4N5torch2nn18TransformerDecoder4ImplE
torch::nn::TransformerDecoderImplhttps://docs.pytorch.org/cppdocs/api/nn/transformer.html#_CPPv4N5torch2nn22TransformerDecoderImplE
TransformerDecoderImpl()https://docs.pytorch.org/cppdocs/api/nn/transformer.html#_CPPv4N5torch2nn22TransformerDecoderImpl22TransformerDecoderImplE23TransformerDecoderLayer7int64_t
TransformerDecoderImpl()https://docs.pytorch.org/cppdocs/api/nn/transformer.html#_CPPv4N5torch2nn22TransformerDecoderImpl22TransformerDecoderImplE25TransformerDecoderOptions
reset()https://docs.pytorch.org/cppdocs/api/nn/transformer.html#_CPPv4N5torch2nn22TransformerDecoderImpl5resetEv
reset_parameters()https://docs.pytorch.org/cppdocs/api/nn/transformer.html#_CPPv4N5torch2nn22TransformerDecoderImpl16reset_parametersEv
forward()https://docs.pytorch.org/cppdocs/api/nn/transformer.html#_CPPv4N5torch2nn22TransformerDecoderImpl7forwardERK6TensorRK6TensorRK6TensorRK6TensorRK6TensorRK6Tensor
optionshttps://docs.pytorch.org/cppdocs/api/nn/transformer.html#_CPPv4N5torch2nn22TransformerDecoderImpl7optionsE
layershttps://docs.pytorch.org/cppdocs/api/nn/transformer.html#_CPPv4N5torch2nn22TransformerDecoderImpl6layersE
normhttps://docs.pytorch.org/cppdocs/api/nn/transformer.html#_CPPv4N5torch2nn22TransformerDecoderImpl4normE
TransformerEncoderLayerhttps://docs.pytorch.org/cppdocs/api/nn/transformer.html#transformerencoderlayer
torch::nn::TransformerEncoderLayerImplhttps://docs.pytorch.org/cppdocs/api/nn/transformer.html#_CPPv4N5torch2nn27TransformerEncoderLayerImplE
TransformerEncoderLayerImpl()https://docs.pytorch.org/cppdocs/api/nn/transformer.html#_CPPv4N5torch2nn27TransformerEncoderLayerImpl27TransformerEncoderLayerImplE7int64_t7int64_t
TransformerEncoderLayerImpl()https://docs.pytorch.org/cppdocs/api/nn/transformer.html#_CPPv4N5torch2nn27TransformerEncoderLayerImpl27TransformerEncoderLayerImplE30TransformerEncoderLayerOptions
forward()https://docs.pytorch.org/cppdocs/api/nn/transformer.html#_CPPv4N5torch2nn27TransformerEncoderLayerImpl7forwardERK6TensorRK6TensorRK6Tensor
reset()https://docs.pytorch.org/cppdocs/api/nn/transformer.html#_CPPv4N5torch2nn27TransformerEncoderLayerImpl5resetEv
reset_parameters()https://docs.pytorch.org/cppdocs/api/nn/transformer.html#_CPPv4N5torch2nn27TransformerEncoderLayerImpl16reset_parametersEv
optionshttps://docs.pytorch.org/cppdocs/api/nn/transformer.html#_CPPv4N5torch2nn27TransformerEncoderLayerImpl7optionsE
self_attnhttps://docs.pytorch.org/cppdocs/api/nn/transformer.html#_CPPv4N5torch2nn27TransformerEncoderLayerImpl9self_attnE
linear1https://docs.pytorch.org/cppdocs/api/nn/transformer.html#_CPPv4N5torch2nn27TransformerEncoderLayerImpl7linear1E
dropouthttps://docs.pytorch.org/cppdocs/api/nn/transformer.html#_CPPv4N5torch2nn27TransformerEncoderLayerImpl7dropoutE
linear2https://docs.pytorch.org/cppdocs/api/nn/transformer.html#_CPPv4N5torch2nn27TransformerEncoderLayerImpl7linear2E
norm1https://docs.pytorch.org/cppdocs/api/nn/transformer.html#_CPPv4N5torch2nn27TransformerEncoderLayerImpl5norm1E
norm2https://docs.pytorch.org/cppdocs/api/nn/transformer.html#_CPPv4N5torch2nn27TransformerEncoderLayerImpl5norm2E
dropout1https://docs.pytorch.org/cppdocs/api/nn/transformer.html#_CPPv4N5torch2nn27TransformerEncoderLayerImpl8dropout1E
dropout2https://docs.pytorch.org/cppdocs/api/nn/transformer.html#_CPPv4N5torch2nn27TransformerEncoderLayerImpl8dropout2E
TransformerDecoderLayerhttps://docs.pytorch.org/cppdocs/api/nn/transformer.html#transformerdecoderlayer
MultiheadAttentionhttps://docs.pytorch.org/cppdocs/api/nn/transformer.html#multiheadattention
torch::nn::MultiheadAttentionhttps://docs.pytorch.org/cppdocs/api/nn/transformer.html#_CPPv4N5torch2nn18MultiheadAttentionE
Implhttps://docs.pytorch.org/cppdocs/api/nn/transformer.html#_CPPv4N5torch2nn18MultiheadAttention4ImplE
torch::nn::MultiheadAttentionImplhttps://docs.pytorch.org/cppdocs/api/nn/transformer.html#_CPPv4N5torch2nn22MultiheadAttentionImplE
MultiheadAttentionImpl()https://docs.pytorch.org/cppdocs/api/nn/transformer.html#_CPPv4N5torch2nn22MultiheadAttentionImpl22MultiheadAttentionImplE7int64_t7int64_t
MultiheadAttentionImpl()https://docs.pytorch.org/cppdocs/api/nn/transformer.html#_CPPv4N5torch2nn22MultiheadAttentionImpl22MultiheadAttentionImplERK25MultiheadAttentionOptions
forward()https://docs.pytorch.org/cppdocs/api/nn/transformer.html#_CPPv4N5torch2nn22MultiheadAttentionImpl7forwardERK6TensorRK6TensorRK6TensorRK6TensorbRK6Tensorb
reset()https://docs.pytorch.org/cppdocs/api/nn/transformer.html#_CPPv4N5torch2nn22MultiheadAttentionImpl5resetEv
_reset_parameters()https://docs.pytorch.org/cppdocs/api/nn/transformer.html#_CPPv4N5torch2nn22MultiheadAttentionImpl17_reset_parametersEv
optionshttps://docs.pytorch.org/cppdocs/api/nn/transformer.html#_CPPv4N5torch2nn22MultiheadAttentionImpl7optionsE
_qkv_same_embed_dimhttps://docs.pytorch.org/cppdocs/api/nn/transformer.html#_CPPv4N5torch2nn22MultiheadAttentionImpl19_qkv_same_embed_dimE
in_proj_weighthttps://docs.pytorch.org/cppdocs/api/nn/transformer.html#_CPPv4N5torch2nn22MultiheadAttentionImpl14in_proj_weightE
in_proj_biashttps://docs.pytorch.org/cppdocs/api/nn/transformer.html#_CPPv4N5torch2nn22MultiheadAttentionImpl12in_proj_biasE
bias_khttps://docs.pytorch.org/cppdocs/api/nn/transformer.html#_CPPv4N5torch2nn22MultiheadAttentionImpl6bias_kE
bias_vhttps://docs.pytorch.org/cppdocs/api/nn/transformer.html#_CPPv4N5torch2nn22MultiheadAttentionImpl6bias_vE
out_projhttps://docs.pytorch.org/cppdocs/api/nn/transformer.html#_CPPv4N5torch2nn22MultiheadAttentionImpl8out_projE
q_proj_weighthttps://docs.pytorch.org/cppdocs/api/nn/transformer.html#_CPPv4N5torch2nn22MultiheadAttentionImpl13q_proj_weightE
k_proj_weighthttps://docs.pytorch.org/cppdocs/api/nn/transformer.html#_CPPv4N5torch2nn22MultiheadAttentionImpl13k_proj_weightE
v_proj_weighthttps://docs.pytorch.org/cppdocs/api/nn/transformer.html#_CPPv4N5torch2nn22MultiheadAttentionImpl13v_proj_weightE
head_dimhttps://docs.pytorch.org/cppdocs/api/nn/transformer.html#_CPPv4N5torch2nn22MultiheadAttentionImpl8head_dimE
Show Source https://docs.pytorch.org/cppdocs/_sources/api/nn/transformer.md.txt
ExecuTorchhttps://docs.pytorch.org/executorch
Helionhttps://docs.pytorch.org/helion
torchaohttps://docs.pytorch.org/ao
kinetohttps://github.com/pytorch/kineto
torchtitanhttps://github.com/pytorch/torchtitan
TorchRLhttps://docs.pytorch.org/rl
torchvisionhttps://docs.pytorch.org/vision
torchaudiohttps://docs.pytorch.org/audio
tensordicthttps://docs.pytorch.org/tensordict
PyTorch on XLA Deviceshttps://docs.pytorch.org/xla
View Docshttps://docs.pytorch.org/docs/stable/index.html
View Tutorialshttps://docs.pytorch.org/tutorials
View Resourceshttps://pytorch.org/resources
Privacy Policyhttps://www.linuxfoundation.org/privacy/
https://www.facebook.com/pytorch
https://twitter.com/pytorch
https://www.youtube.com/pytorch
https://www.linkedin.com/company/pytorch
https://pytorch.slack.com
https://pytorch.org/wechat
Policieshttps://www.linuxfoundation.org/legal/policies
Trademark Usagehttps://www.linuxfoundation.org/trademark-usage
Privacy Policyhttp://www.linuxfoundation.org/privacy
Cookies Policyhttps://opensource.fb.com/legal/cookie-policy
Sphinxhttps://www.sphinx-doc.org/
PyData Sphinx Themehttps://pydata-sphinx-theme.readthedocs.io/en/stable/index.html

Viewport: width=device-width, initial-scale=1


URLs of crawlers that visited me.