Closed zohaibmohammad closed 3 years ago
@engrmz After I launched the torchsummary on the model I discovered that during forward and back passes SIREN consumes 10GB of memory. Probably it`s the CUDA problem.
Can someone explain why does SIREN consume so much memory?
Can someone explain why does SIREN consume so much memory?
In my opinion, the reason is that the calculation of first-order or second-order derivatives during the training takes up a lot of memory.
@xiaulinhu can you explain why do the derivatives affect the size of forward-pass? I thought it was calculated using shapes of input and output of the layers. I used torchsummary to determine the size.
Has anyone managed to solve this?
You can modify the logging functions (in utils.py) to not log the image gradients and laplacian. This should reduce the memory footprint of the model, and still meet the "image fitting" experiment criteria. Those results are included to show that the analytical derivatives of the SIREN are accurate without even being supervised on.
Hi, I am trying to execute the code for image fitting problem. I am setting batch size =1 (default value) as I have 4gb GPU. Still the training stops due to GPU out of memory. Can anyone let me know how could I solve this problem? Thanks.