Is there any other way apart from detach() where I don’t run out of memory?
Also, my batch size os 32, this loop barely runs for 5 batches and says CUDA out of memory if I don’t use detach. I want to calculate the fisher matrix with more number of samples from Dataset A, how can I still run this?
Or is there any efficient of calculating fisher?