Shortcuts

Struct MultiheadAttentionForwardFuncOptions

Page Contents

Struct Documentation

struct torch::nn::functional::MultiheadAttentionForwardFuncOptions

Options for torch::nn::functional::multi_head_attention_forward

Public Functions

MultiheadAttentionForwardFuncOptions(int64_t embed_dim_to_check, int64_t num_heads, Tensor in_proj_weight, Tensor in_proj_bias, Tensor bias_k, Tensor bias_v, bool add_zero_attn, double dropout_p, Tensor out_proj_weight, Tensor out_proj_bias)
auto embed_dim_to_check(const int64_t &new_embed_dim_to_check) -> decltype(*this)
auto embed_dim_to_check(int64_t &&new_embed_dim_to_check) -> decltype(*this)
const int64_t &embed_dim_to_check() const noexcept
int64_t &embed_dim_to_check() noexcept
auto num_heads(const int64_t &new_num_heads) -> decltype(*this)
auto num_heads(int64_t &&new_num_heads) -> decltype(*this)
const int64_t &num_heads() const noexcept
int64_t &num_heads() noexcept
auto in_proj_weight(const Tensor &new_in_proj_weight) -> decltype(*this)
auto in_proj_weight(Tensor &&new_in_proj_weight) -> decltype(*this)
const Tensor &in_proj_weight() const noexcept
Tensor &in_proj_weight() noexcept
auto in_proj_bias(const Tensor &new_in_proj_bias) -> decltype(*this)
auto in_proj_bias(Tensor &&new_in_proj_bias) -> decltype(*this)
const Tensor &in_proj_bias() const noexcept
Tensor &in_proj_bias() noexcept
auto bias_k(const Tensor &new_bias_k) -> decltype(*this)
auto bias_k(Tensor &&new_bias_k) -> decltype(*this)
const Tensor &bias_k() const noexcept
Tensor &bias_k() noexcept
auto bias_v(const Tensor &new_bias_v) -> decltype(*this)
auto bias_v(Tensor &&new_bias_v) -> decltype(*this)
const Tensor &bias_v() const noexcept
Tensor &bias_v() noexcept
auto add_zero_attn(const bool &new_add_zero_attn) -> decltype(*this)
auto add_zero_attn(bool &&new_add_zero_attn) -> decltype(*this)
const bool &add_zero_attn() const noexcept
bool &add_zero_attn() noexcept
auto dropout_p(const double &new_dropout_p) -> decltype(*this)
auto dropout_p(double &&new_dropout_p) -> decltype(*this)
const double &dropout_p() const noexcept
double &dropout_p() noexcept
auto out_proj_weight(const Tensor &new_out_proj_weight) -> decltype(*this)
auto out_proj_weight(Tensor &&new_out_proj_weight) -> decltype(*this)
const Tensor &out_proj_weight() const noexcept
Tensor &out_proj_weight() noexcept
auto out_proj_bias(const Tensor &new_out_proj_bias) -> decltype(*this)
auto out_proj_bias(Tensor &&new_out_proj_bias) -> decltype(*this)
const Tensor &out_proj_bias() const noexcept
Tensor &out_proj_bias() noexcept
auto training(const bool &new_training) -> decltype(*this)
auto training(bool &&new_training) -> decltype(*this)
const bool &training() const noexcept
bool &training() noexcept
auto key_padding_mask(const Tensor &new_key_padding_mask) -> decltype(*this)
auto key_padding_mask(Tensor &&new_key_padding_mask) -> decltype(*this)
const Tensor &key_padding_mask() const noexcept
Tensor &key_padding_mask() noexcept
auto need_weights(const bool &new_need_weights) -> decltype(*this)
auto need_weights(bool &&new_need_weights) -> decltype(*this)
const bool &need_weights() const noexcept
bool &need_weights() noexcept
auto attn_mask(const Tensor &new_attn_mask) -> decltype(*this)
auto attn_mask(Tensor &&new_attn_mask) -> decltype(*this)
const Tensor &attn_mask() const noexcept
Tensor &attn_mask() noexcept
auto use_separate_proj_weight(const bool &new_use_separate_proj_weight) -> decltype(*this)
auto use_separate_proj_weight(bool &&new_use_separate_proj_weight) -> decltype(*this)
const bool &use_separate_proj_weight() const noexcept
bool &use_separate_proj_weight() noexcept
auto q_proj_weight(const Tensor &new_q_proj_weight) -> decltype(*this)
auto q_proj_weight(Tensor &&new_q_proj_weight) -> decltype(*this)
const Tensor &q_proj_weight() const noexcept
Tensor &q_proj_weight() noexcept
auto k_proj_weight(const Tensor &new_k_proj_weight) -> decltype(*this)
auto k_proj_weight(Tensor &&new_k_proj_weight) -> decltype(*this)
const Tensor &k_proj_weight() const noexcept
Tensor &k_proj_weight() noexcept
auto v_proj_weight(const Tensor &new_v_proj_weight) -> decltype(*this)
auto v_proj_weight(Tensor &&new_v_proj_weight) -> decltype(*this)
const Tensor &v_proj_weight() const noexcept
Tensor &v_proj_weight() noexcept
auto static_k(const Tensor &new_static_k) -> decltype(*this)
auto static_k(Tensor &&new_static_k) -> decltype(*this)
const Tensor &static_k() const noexcept
Tensor &static_k() noexcept
auto static_v(const Tensor &new_static_v) -> decltype(*this)
auto static_v(Tensor &&new_static_v) -> decltype(*this)
const Tensor &static_v() const noexcept
Tensor &static_v() noexcept

Docs

Access comprehensive developer documentation for PyTorch

View Docs

Tutorials

Get in-depth tutorials for beginners and advanced developers

View Tutorials

Resources

Find development resources and get your questions answered

View Resources