RNN_example target values?

Having read all the documentation on CUDNN and CUBLAS I could get my hands on, I just started writing my first simple program, where I want to do a (very basic) timeseries forecast using RNN/LSTM features in CUDNN.

From my perspective, I’m used to feed my networks a batch of samples (say timeserie values from t-1 through t-10), along with an expected target (say, the next 3 values of the timeserie, from t0 through t2).
Training then should return the cumulative error for all the samples in the batch, along with the adjustment for each weight.

When I look at RNN_example.cu I can see x as the samples making up the batch being fed to the network, but I don’t see y being similarly initialized with target values.
How do cudnnRNNForwardTraining(), cudnnRNNBackwardData(), and cudnnRNNBackwardWeights() determine the weight adjustments, if the target values are (apparently) not set?

Thanks in advance