OptimalGradCheckpointing icon indicating copy to clipboard operation
OptimalGradCheckpointing copied to clipboard

How do I get the checkpoints when applying it at linear chain feedforward models?

Open nyngwang opened this issue 2 years ago • 1 comments

As title. The program shows the peak memory usage and cut-offs, while I need help/hint as the title.

nyngwang avatar Jul 22 '23 01:07 nyngwang

Hi sorry for the late reply. You can get the checkpointed tensors at https://github.com/jianweif/OptimalGradCheckpointing/blob/main/graph.py#L876 Instead of returning tensor_dict[target] which is the output tensor, you can return the entire tensor_dict where each value will be a checkpointed tensor in the computation graph.

jianweif avatar Apr 17 '24 22:04 jianweif