| 60 | } |
| 61 | |
| 62 | LayerConf GenPoolingConf(string name, bool max_pool, int kernel, int stride, |
| 63 | int pad) { |
| 64 | LayerConf conf; |
| 65 | conf.set_name(name); |
| 66 | conf.set_type(engine + "_pooling"); |
| 67 | PoolingConf *pool = conf.mutable_pooling_conf(); |
| 68 | pool->set_kernel_size(kernel); |
| 69 | pool->set_stride(stride); |
| 70 | pool->set_pad(pad); |
| 71 | if (!max_pool) pool->set_pool(PoolingConf_PoolMethod_AVE); |
| 72 | return conf; |
| 73 | } |
| 74 | |
| 75 | LayerConf GenReLUConf(string name) { |
| 76 | LayerConf conf; |