inception module, channels: [inputChannel, 1x1, 3x3_reduce, 3x3, 5x5_reduce, 5x5, pool_proj]
| 14 | |
| 15 | // inception module, channels: [inputChannel, 1x1, 3x3_reduce, 3x3, 5x5_reduce, 5x5, pool_proj] |
| 16 | static VARP inception(VARP x, int inputChannelSet, int channel_1x1, |
| 17 | int channel_3x3_reduce, int channel_3x3, |
| 18 | int channel_5x5_reduce, int channel_5x5, |
| 19 | int channel_pool) { |
| 20 | auto inputChannel = x->getInfo()->dim[1]; |
| 21 | auto y1 = _Conv(0.0f, 0.0f, x, {inputChannel, channel_1x1}, {1, 1}, VALID, {1, 1}, {1, 1}, 1); |
| 22 | auto y2 = _Conv(0.0f, 0.0f, x, {inputChannel, channel_3x3_reduce}, {1, 1}, VALID, {1, 1}, {1, 1}, 1); |
| 23 | y2 = _Conv(0.0f, 0.0f, y2, {channel_3x3_reduce, channel_3x3}, {3, 3}, SAME, {1, 1}, {1, 1}, 1); |
| 24 | auto y3 = _Conv(0.0f, 0.0f, x, {inputChannel, channel_5x5_reduce}, {1, 1}, VALID, {1, 1}, {1, 1}, 1); |
| 25 | y3 = _Conv(0.0f, 0.0f, y3, {channel_5x5_reduce, channel_5x5}, {5, 5}, SAME, {1, 1}, {1, 1}, 1); |
| 26 | auto y4 = _MaxPool(x, {3, 3}, {1, 1}, SAME); |
| 27 | y4 = _Conv(0.0f, 0.0f, y4, {inputChannel, channel_pool}, {1, 1}, VALID, {1, 1}, {1, 1}, 1); |
| 28 | return _Concat({y1, y2, y3, y4}, 1); // concat on channel axis (NCHW) |
| 29 | } |
| 30 | |
| 31 | VARP googLeNetExpr(int numClass) { |
| 32 | auto x = _Input({1, 3, 224, 224}, NC4HW4); |
no test coverage detected