Do you need to save node.calculate_result? Are you using these values later on? If not I’d discourage saving them.
If you need them, but don’t want to backprop through them (it seems to be the case), you should save only the tensor, not the Variable that wraps it. This will allow the graph that holds the buffers necessary for backward to be freed and release held memory. Just replace node.calculate_result = ... with result = ...; node.calculate_result = result.data.