跳转到内容
View in the app

A better way to browse. Learn more.

彼岸论坛

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.
欢迎抵达彼岸 彼岸花开 此处谁在 -彼岸论坛

[机器学习] 3b1b Attention 模型视频中的 Q 矩阵 K 矩阵乘法是不是写错了?

发表于

视频中 10:33 处,解释了 Qn Kn 代表矩阵的第 n 列。

10:43,介绍了 Ki 和 Qj 点积的计算结果应该是 Attention 矩阵的第 i 行 j 列。然而 Attention 的公式是 QK',QK'无法得到这样的计算结果!相反,能够获得视频中所示的 Attention 矩阵的应该是 K'Q 。那么,视频中的公式是不是写错了?还是 Attention 矩阵错了?

下面是说明这个问题的 MATLAB 代码,请在 MATLAB 的实时脚本中执行此代码,以达到最佳的显示效果。

clear
syms  Q K q k;
Q=sym('q',[3 3]);
K=sym('k',[3 3]);
Q
K
Q*K'
K'*Q

谁知道为什么这里的 markdown 编辑为什么不支持 latex 行间公式?

Featured Replies

No posts to show

创建帐户或登录来提出意见

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.