What’s the problem with constructing a new graph every time? That’s the whole framework philosophy, so that it’s not restricted to static graph. To cut the history you can repackage the Variable in a new one Variable(var.data) (this is acceptable, as long as you discard var immediately - we don’t support having many variables with the same data). Also, you can use .detach() to obtain a new Variable that doesn’t require the gradient.