facebookresearch / facebookresearch/SlowFast
Lower number of residual blocks uses more GPU memory
- Dominant language
- Python
- Stars
- 7.4k
- Forks
- 1.3k
- PR merge metrics
- No merged PRs in 30d
Description
Hello, I'm trying to train the network while modifying the backbone Resnet architecture to be a similiar one to Resnet-18 instead of Resnet-50.
For that I changed the tranformation from **bottleneck_transform** to **basic_transform** in the config file (and later in the Resnet stage in resnet_helper.py, but it did not solve the issue below) and changed **_MODEL_STAGE_DEPTH** to (2,2,2,2) instead of (3,4,6,3). I also changed the NUM_BLOCK_TEMP_KERNEL to all 2s as well. The architecture printed out looks alright and it runs however, if I run with MODEL_STAGE_DEPTH (2,2,2,2) I get the memory usage printed out as ~15GB, but if I run it with (3,4,6,3), or for example (3,2,2,2) (mostly anything more than (2,2,2,2) as far as I tried) I get lower memory usage (6-8GB). ((1,1,1,1), uses arround 11GB).
I don't understand how lower number of blocks use more GPU memory.
Would be grateful for any help.
Thank you.
**EDIT** Width per group is changed to 16 in the config file as well, and I'm using batch size of 32.
Contributor guide
Assessment
This issue has not been assessed yet.