2d 卷积梯度推导与实现
符号说明 $$ \begin{align*} X &: 卷积输入,\text{shape} 为[b,h,w,c_{in}]\\ W &: 卷积核,\text{shape}为[a,a,c_{in},c_{out}]\\ s &: 步长\\ f &: 卷积结果,\text{shape}为[b,(h-k)/s+1,(w-k)/s+1,c_{out}]\\ loss &: 损失函数,loss = g(f) \end{align*} $$ 约定,所有张量下标从 0 开始。 ...