If Xn is the activation vector for layer n, and Wn is theweights connecting layer n to layer n +1, for some neuron i in layer n, some neuron j in layer n +1, and some class t(using threshold θn+1)
Note: For every layer/class you only compute one Q value. You don't compute a Q-value for every node, you compute a Q-value for every layer.