Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

minor fix for attention docs #1205

Merged
merged 1 commit into from
Jan 31, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions burn-core/src/nn/attention/mha.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ use libm::sqrtf;
/// Configuration to create a [Multi Head Attention](MultiHeadAttention) layer.
#[derive(Config)]
pub struct MultiHeadAttentionConfig {
/// The size of the each linear layer.
/// The size of each linear layer.
d_model: usize,
/// The number of heads.
n_heads: usize,
Expand Down Expand Up @@ -160,7 +160,7 @@ impl<B: Backend> MhaInput<B> {
/// [Multihead attention](MultiHeadAttention) outputs.
#[derive(Debug, Clone)]
pub struct MhaOutput<B: Backend> {
/// The attention weights [batch_size, seq_length_1, seq_length_2].
/// The attention weights [batch_size, n_heads, seq_length_1, seq_length_2].
pub weights: Tensor<B, 4>,
/// The context tensor [batch_size, seq_length_1, d_model].
pub context: Tensor<B, 3>,
Expand Down
Loading