In your VBN implementation’s forward, you are directly operating on the tensor within the Variable x, ie you are using x.data, so you lose all dynamic graph building there. Hence no grad backprop. Just do things on x, don’t extract x.data.