youweiliang / evit

Python code for ICLR 2022 spotlight paper EViT: Expediting Vision Transformers via Token Reorganizations
Apache License 2.0
169 stars 19 forks source link

Bug in speed_test.py #11

Open caddyless opened 2 years ago

caddyless commented 2 years ago

I found torch.no_grad() is missed in the speed_test.py, which significantly slows down the throughput. Is this intentional or a mistake?

youweiliang commented 2 years ago

Hi @caddyless,

Thanks for your comment. Actually, I didn't observe notable differences in the results of the throughput testing with/without torch.no_grad(). The differences were all within 1%, so there was no need to add torch.no_grad(). Did you find a large difference in the throughput testing with/without torch.no_grad()?