I want to implement to LeNet-5 with cuDNN, and try to train the net on MNIST data set.
The last layer of the net is 'Softmax', and I use the function 'cudnnSoftmaxForward()' in the forward process. And then, I want to use the function 'cudnnSoftmaxBackward()' in the backward process, but I do not sure about one of the parameter in the function 'cudnnSoftmaxBackward()'--'dy'.
The function 'cudnnSoftmaxtBackward' provided by NVIDIA is :
cuDNNSoftmaxBackward parameter
In the API ,I know that 'dy' means the 'input_diff', but the softmax layer is the last layer, how can I feed the 'input_diff' for the function 'cudnnSoftmaxBackward()'? Can I just feed it with the diff between 'network target output' and 'network actual output' ?