↓ 1 callersFunctionscaled_dot_product_attention§3.2.1, Eq. 1 — Attention(Q, K, V) = softmax(QK^T / √d_k) V "We compute the attention function on a set of queries simultaneously, packed to
skills/paper2code/worked/attention_is_all_you_need/src/model.py:61
Methodforward §3.4, Eq. 14 — L_simple = E[||ε − ε_θ(x_t, t)||²] Args: noise_pred: (batch, C, H, W) — predicted noise ε_θ(x_t, t)
skills/paper2code/worked/ddpm/src/loss.py:43
Methodforward Args: x: (batch, in_channels, H, W) t_emb: (batch, time_embed_dim) Returns: (batch, out_channels
skills/paper2code/worked/ddpm/src/model.py:124
Methodforward Args: x: (batch, channels, H, W) Returns: (batch, channels, H, W)
skills/paper2code/worked/ddpm/src/model.py:164
MethodforwardPredict noise ε_θ(x_t, t). Args: x: (batch, C, H, W) — noisy image x_t t: (batch,) — integer timesteps Retur
skills/paper2code/worked/ddpm/src/model.py:316
Methodforward Args: query: (batch, seq_q, d_model) key: (batch, seq_k, d_model) value: (batch, seq_k, d_model)
skills/paper2code/worked/attention_is_all_you_need/src/model.py:141
Methodforward Args: x: (batch, seq_len, d_model) src_mask: (batch, 1, 1, seq_len) — padding mask Returns: (batc
skills/paper2code/worked/attention_is_all_you_need/src/model.py:289
Methodforward Args: x: (batch, src_len, d_model) — embedded + positionally-encoded source mask: (batch, 1, 1, src_len) — source pad
skills/paper2code/worked/attention_is_all_you_need/src/model.py:391