Backprop-Q: Generalized Backpropagation for Stochastic Computation Graphs