【发布时间】:2019-08-28 00:24:39
【问题描述】:
我正在观看 Andrew Ng's videos on CNN 并希望将 6 x 6 图像与 3 x 3 过滤器进行卷积。我用 numpy 处理这个问题的方式如下:
image = np.ones((6,6))
filter = np.ones((3,3))
convolved = np.convolve(image, filter)
运行这个会报错:
ValueError: object too deep for desired array
我可以从numpy documentation of convolve了解如何正确使用convolve方法。
另外,有没有办法用 numpy 进行跨步卷积?
【问题讨论】:
标签: python numpy image-processing conv-neural-network convolution