This post (Finding model size) might help you.
If you want to print the RAM occupancy for each module, here’s an example snippet
for m in model.modules():
for param in m.parameters():
print(param.nelement() * param.element_size())
This post (Finding model size) might help you.
If you want to print the RAM occupancy for each module, here’s an example snippet
for m in model.modules():
for param in m.parameters():
print(param.nelement() * param.element_size())