{"url":"https://htn20190109.hatenablog.com/entry/2026/05/05/012257","description":"import numpy as np def im2col(input_data, filter_h, filter_w, stride, pad, constant_values=0): N, C, H, W = input_data.shape out_h = (H + 2*pad - filter_h) // stride + 1 out_w = (W + 2*pad - filter_w) // stride + 1 img = np.pad( input_data, [(0,0),(0,0),(pad,pad),(pad,pad)], mode=\"constant\", constan\u2026","image_url":null,"categories":["DL"],"author_url":"https://blog.hatena.ne.jp/HTN20190109/","width":"100%","provider_url":"https://hatena.blog","blog_title":"HTN20190109\u306e\u65e5\u8a18","published":"2026-05-05 01:22:57","blog_url":"https://htn20190109.hatenablog.com/","version":"1.0","height":"190","type":"rich","provider_name":"Hatena Blog","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fhtn20190109.hatenablog.com%2Fentry%2F2026%2F05%2F05%2F012257\" title=\"im2col - 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>","title":"im2col","author_name":"HTN20190109"}