HRNet / HRNet-Image-Classification

Train the HRNet model on ImageNet
https://jingdongwang2017.github.io/Projects/HRNet/
MIT License
969 stars 216 forks source link

Why do I use your HRNetW18, the forward time is 2.5 times as long as resnet50 #3

Closed devilztt closed 5 years ago

devilztt commented 5 years ago

Why do I use your HRNetW18, the forward time is 2.5 times as long as resnet50

sunke123 commented 5 years ago

@devilztt Hi, thanks for your attention. GFLOPs doesn't correspond to the runtime because of different implementation. In Pytorch implementation, the convolutional layers are executed in series, even though we connect the different branches in parallel. So, the speed of HRNets are actually slower than ResNets, which is similar to Group Convolution vs Standard Convolution. Training and inference speed for our HRNet could be improved if Pytorch supports the parallel convolutions.

devilztt commented 5 years ago

@sunke123 Thank you for your reply. I will close this issues.

mehtadushy commented 5 years ago

Hi @devilztt @sunke123

Have you tried timing the forward pass by tracing the model with torchscript (jit) first ?