Hey, thanks for the reply! I will take a look at checkpointing.
And these values are all in the same tensor. Basically, some sections of the returned [4096], [32768], etc. tensor are positive, others are negative, and I want to ignore any gradients calculated from the negative section.