{"html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fhtn20190109.hatenablog.com%2Fentry%2F2025%2F08%2F22%2F020248\" title=\"Affine\u30af\u30e9\u30b9 - HTN20190109\u306e\u65e5\u8a18\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","author_name":"HTN20190109","type":"rich","url":"https://htn20190109.hatenablog.com/entry/2025/08/22/020248","blog_title":"HTN20190109\u306e\u65e5\u8a18","height":"190","author_url":"https://blog.hatena.ne.jp/HTN20190109/","blog_url":"https://htn20190109.hatenablog.com/","title":"Affine\u30af\u30e9\u30b9","published":"2025-08-22 02:02:48","provider_url":"https://hatena.blog","image_url":null,"description":"python3.11 import numpy as np class Affine: def __init__(self, W, b): self.W = W self.b = b self.x = None self.original_x_shape = None self.dW = None self.db = None def forward(self,x): self.original_x_shape = x.shape x = x.reshape(x.shape[0], -1) self.x = x out = np.dot(self.x, self.W) return out d\u2026","provider_name":"Hatena Blog","width":"100%","version":"1.0","categories":["DL"]}