Merge Batch Normarlization to fc or conv layer based on PaddlePaddle
When the training process is finished, we can merge the batch normalization with the convolution or fully connected layer. Doing so will give us a forward acceleration.
For more details about batch normalization，see here
We demonstrate a demo of Mobilenet.
Preparation for Merge
- the source model config with batch normalization. see
- the source model with batch normalization. see
- the dest model config without batch normalization see
Merge Batch norm
- modify the
- Separate modify the source and dest model in
- Merge batch normalization speeds up the forward process by around 30%.