THU-MIG / RepViT

RepViT: Revisiting Mobile CNN From ViT Perspective [CVPR 2024] and RepViT-SAM: Towards Real-Time Segmenting Anything
https://arxiv.org/abs/2307.09283
Apache License 2.0
681 stars 55 forks source link

Is the GPU memory usage of RepViT-M1.1 similar to that of ResNet50? #41

Closed AlphaPlusTT closed 4 months ago

AlphaPlusTT commented 4 months ago

I replaced the original model's backbone ResNet50 with RepViT-M1.1. However, during training, I noticed that the GPU memory usage remained almost the same. Is this normal?

jameslahm commented 4 months ago
Hi, I just compared RepViT-M1.1 with ResNet50 in terms of GPU memory during training and inference. Here are the results: RepViT-M1.1 ResNet50
Training (bs=256) 13469MiB 14617MiB
Inference (bs=1024) 8763MiB 14333MiB

In my environment, the GPU memory of RepViT-M1.1 is also similar to that of ResNet50 during training but much smaller during inference.