This repository was archived by the owner on Jan 22, 2025. It is now read-only.
Commit cca2475
committed
Enable operators fusion (Conv + BN + ReLu) in FBNet V2
Summary:
Pull Request resolved: #592
X-link: facebookresearch/mobile-vision#172
The FBNet V2 consists of several basic blocks of pattern conv(2d) + BatchNorm + ReLU. These operators can be fused into one operator, greatly speeding up the computation in GPU.
This diff / PR adds option to build an FBNet V2 backbone in fused manner, i.e. it looks up recursively the blocks and sub-blocks for the known patterns, and fuse them using `mobile_cv.arch.utils.fuse_utils`
Differential Revision: D47395999
fbshipit-source-id: 406b08af4a238de95d126e2761d6b6896b9c83971 parent e4fa6d6 commit cca2475
2 files changed
Lines changed: 7 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
66 | 66 | | |
67 | 67 | | |
68 | 68 | | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
69 | 72 | | |
70 | 73 | | |
71 | 74 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
197 | 197 | | |
198 | 198 | | |
199 | 199 | | |
| 200 | + | |
| 201 | + | |
200 | 202 | | |
201 | 203 | | |
202 | 204 | | |
203 | 205 | | |
204 | 206 | | |
205 | 207 | | |
| 208 | + | |
| 209 | + | |
206 | 210 | | |
207 | 211 | | |
208 | 212 | | |
| |||
0 commit comments