i was trying to write rnn from scratch in python.i am following a blog and he did an amazing job in helping the beginners.I got all the parts except the Backpropogation of Rnn,particularly the hidden layer. Can anyone please explain me the backpropogation of rnn?How do we calculate the delta of hidden layer at each time step in the code, i can post the snippet of code here,though i don't think it will be very useful,the program is about addition of two numbers by first converting them into binary forms.also it will help me visualize vanishing gradient in a better way,theoretically i understand how this happen but i am struggling with the code.for position in range(binary_dim):    X = np.array([[a[position],b[position]]])    layer_1 = layer_1_values[-position-1]    prev_layer_1 = layer_1_values[-position-2]    # error at output layer    layer_2_delta = layer_2_deltas[-position-1]    # error at hidden layer    layer_1_delta = (future_layer_1_delta.dot(synapse_h.T) + layer_2_delta.dot(synapse_1.T)) * sigmoid_output_to_derivative(layer_1)    # let's update all our weights so we can try again    synapse_1_update += np.atleast_2d(layer_1).T.dot(layer_2_delta)    synapse_h_update += np.atleast_2d(prev_layer_1).T.dot(layer_1_delta)here is a link to his blog http://iamtrask.github.io/2015/11/15/anyone-can-code-lstm/To make it clearer, i want to know what will be the gradient of this term,this is the forward propogation of hidden layer where we add the previous layer output along with the input.  layer_1 = sigmoid(np.dot(X,synapse_0) + np.dot(layer_1_values[-1],synapse_h))
understanding the backpropogation of rnn
neural network;backpropagation