RuntimeError: calling backward on a volatile variable

I have set the Variable like

outputs = Variable(outputs.data, requires_grad=True, volatile=False)

but the backward still report the error.

The error may not be caused by your variable outputs but probably another hidden somewhere