{"width":"100%","provider_name":"Hatena Blog","title":"Sigmoid and NLL","height":"190","author_url":"https://blog.hatena.ne.jp/HTN20190109/","description":"import numpy as np class Sigmoid: def forward(self, x, w, b): \"\"\" x: (N, D) w: (D,) b: scalar \"\"\" self.x = x self.w = w z = np.dot(x, w) + b # \u2190 \u3053\u3063\u3061\u306e\u65b9\u304c\u5b89\u5168 self.y_pred = 1 / (1 + np.exp(-z)) return self.y_pred def backward(self, dy): \"\"\" dy: (N,) \"\"\" dz = dy * (1.0 - self.y_pred) * self.y_pred # (N,) \u2026","type":"rich","author_name":"HTN20190109","published":"2026-03-26 01:22:13","blog_title":"HTN20190109\u306e\u65e5\u8a18","categories":["DL"],"html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fhtn20190109.hatenablog.com%2Fentry%2F2026%2F03%2F26%2F012213\" title=\"Sigmoid and NLL - 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>","url":"https://htn20190109.hatenablog.com/entry/2026/03/26/012213","blog_url":"https://htn20190109.hatenablog.com/","version":"1.0","image_url":null,"provider_url":"https://hatena.blog"}