DDRNet
DDRNet copied to clipboard
Merge conv2d and bn
I am using your model to do segmentation, and its performance is really amazing. However, the inference speed is not ideal. I noticed that you merged conv2d and batchnorm during inference. This is probably the potential reason for low speed. However, after I started to work on this, I realized this is not easy work. Could you provide us with the source code for merging conv2d and batchnorm? Thanks in advance!
I am using your model to do segmentation, and its performance is really amazing. However, the inference speed is not ideal. I noticed that you merged conv2d and batchnorm during inference. This is probably the potential reason for low speed. However, after I started to work on this, I realized this is not easy work. Could you provide us with the source code for merging conv2d and batchnorm? Thanks in advance!
The official Pytorch has provided this method in https://github.com/pytorch/pytorch/blob/master/torch/nn/utils/fusion.py.
Thanks for your reply! I know that pytorch has incorporated that function, but it seems that I need to rewrite your model structure with all consecutive conv2ds and bns replaced by conv2ds, and then copy the pre-trained parameters to the new model structure. Is there any easier way to convert the pre-trained model to the new model structure?
I am using your model to do segmentation, and its performance is really amazing. However, the inference speed is not ideal. I noticed that you merged conv2d and batchnorm during inference. This is probably the potential reason for low speed. However, after I started to work on this, I realized this is not easy work. Could you provide us with the source code for merging conv2d and batchnorm? Thanks in advance!
我融合了,但只提升了一些,在2080ti上可达60多fps,和作者提供的eval_speed.py测出来的差不多,我想论文中说的101fps可能是trt加速后的吧