ibot icon indicating copy to clipboard operation
ibot copied to clipboard

some debug about use torch.utils.checkpoint.checkpoint

Open ShiYaya opened this issue 2 years ago • 0 comments

When I try to use torch.utils.checkpoint.checkpoint as follows, and use apex to train the model, I found that the loss is so small as 0.4, but the normal loss is 2.x.

So, do you have some idea about this question?

        for blk in self.blocks:
            # x = blk(x)
            x = torch.utils.checkpoint.checkpoint(blk, x)

ShiYaya avatar Jul 12 '22 12:07 ShiYaya