How to write the updateGradInput and accGradParameters in torch?
<p>I know the two functions are for torch's backward propagation and the interface is as follows
<code>
updateGradInput(input, gradOutput)
accGradParameters(input, gradOutput, scale)
</code>
I'm confused about what the <code>gradInput</code> and <code>gradOutput</code> really mean in a layer.
Assume the network's cost is <code>C</code> and a layer <code>L</code>. Do <code>gradInput</code> and <code>gradOutput</code> of layer <code>L</code> mean <code>d_C/d_input_L</code> and <code>d_C/d_output_L</code>?</p>

<p>If so, how to compute <code>gradInput</code> accorading to <code>gradOutput</code>? </p>

<p>Moreover, does <code>accGradParameters</code> mean to accumulate <code>d_C/d_Weight_L</code> and <code>d_C/d_bias_L</code>? If so, how to compute these values?</p>