<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>HTN20190109</author_name>
  <author_url>https://blog.hatena.ne.jp/HTN20190109/</author_url>
  <blog_title>HTN20190109の日記</blog_title>
  <blog_url>https://htn20190109.hatenablog.com/</blog_url>
  <categories>
    <anon>DL</anon>
  </categories>
  <description>import numpy as np def softmax(x): # 数値安定化 x = x - np.max(x, axis=1, keepdims=True) return np.exp(x) / np.sum(np.exp(x), axis=1, keepdims=True) def forward(hs, h): &quot;&quot;&quot; hs: (N, T, H) 全時刻の隠れ状態 h : (N, H) 現在の隠れ状態 &quot;&quot;&quot; N, T, H = hs.shape # hを(T方向に)拡張 hr = h.reshape(N, 1, H).repeat(T, axis=1) # 内積（要素積 → 和…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fhtn20190109.hatenablog.com%2Fentry%2F2026%2F05%2F06%2F104111&quot; title=&quot;グローバルアテンションモデル - HTN20190109の日記&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2026-05-06 10:41:11</published>
  <title>グローバルアテンションモデル</title>
  <type>rich</type>
  <url>https://htn20190109.hatenablog.com/entry/2026/05/06/104111</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
