{"provider_url":"https://hatena.blog","type":"rich","categories":["machine_learning"],"description":"\u5206\u985e\u5668\u3078\u306e\u5165\u529b\u90e8\u5206\u3092\u898b\u308b\u3068\u3001 class AttentionDecoder: def forward(self, xs, enc_hs): ... # enc_hs = ['\u543e\u8f29', '\u306f', ...], dec_hs = ['i', 'am', ...], c = '\u543e\u8f29' c = self.attention_forward(enc_hs, dec_hs) # '\u543e\u8f29'+'i' out = np.concatename((c, dec_hs), axis=\") score = self.affine.forward(out) return score \u3068\u306a\u3063\u3066\u3044\u308b\u306e\u3067\u3001attention \u2026","provider_name":"Hatena Blog","author_url":"https://blog.hatena.ne.jp/derwind/","version":"1.0","image_url":null,"blog_title":"\u3089\u3093\u3060\u3080\u306a\u8a18\u61b6","author_name":"derwind","published":"2022-03-05 00:30:17","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Frandommemory.hatenablog.com%2Fentry%2F2022%2F03%2F05%2F003017\" title=\"Attention (4) - \u3089\u3093\u3060\u3080\u306a\u8a18\u61b6\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","title":"Attention (4)","height":"190","url":"https://randommemory.hatenablog.com/entry/2022/03/05/003017","width":"100%","blog_url":"https://randommemory.hatenablog.com/"}