You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I tried to change the Upsample method in the ResnetGenerator class to Upsample2, it suddenly requires more than 500GB and raises an error. What is the reason for this?
Here is the code (in models/networks.py):
else:
model += [Upsample2(ngf * mult),
nn.Conv2d(ngf * mult, int(ngf * mult / 2),
kernel_size=3, stride=1,
padding=1, # output_padding=1,
bias=use_bias),
norm_layer(int(ngf * mult / 2)),
nn.ReLU(True)]
And this is the error:
torch.cuda.OutOfMemoryError: CUDA out of memory. Tried to allocate 512.00 GiB (GPU 0; 39.59 GiB total capacity; 885.03 MiB already allocated; 20.78 GiB free; 1.89 GiB reserved in total by PyTorch) If reserved memory is >> allocated memory try setting max_split_size_mb to avoid fragmentation. See documentation for Memory Management and PYTORCH_CUDA_ALLOC_CONF
The text was updated successfully, but these errors were encountered:
Oh, I guess the reason was the argument to the Upsamle2 function (ngf * mult) is a very big number so it raised an error. Changing it to scale_factor of 2 resolved the issue.
But I have one more question, by default ResnetGenerator uses Conv2dTranspose
When I tried to change the Upsample method in the ResnetGenerator class to Upsample2, it suddenly requires more than 500GB and raises an error. What is the reason for this?
Here is the code (in models/networks.py):
And this is the error:
torch.cuda.OutOfMemoryError: CUDA out of memory. Tried to allocate 512.00 GiB (GPU 0; 39.59 GiB total capacity; 885.03 MiB already allocated; 20.78 GiB free; 1.89 GiB reserved in total by PyTorch) If reserved memory is >> allocated memory try setting max_split_size_mb to avoid fragmentation. See documentation for Memory Management and PYTORCH_CUDA_ALLOC_CONF
The text was updated successfully, but these errors were encountered: