Pooling layer 支持下取整操作
Created by: li099
目前想对齐paddle与某开源tensorflow模型,在都采用size=3 stride=2的maxpooling时, paddle:
[INFO 2017-08-21 22:37:41,586 layers.py:1960] output for __conv_0__: c = 32, h = 23, w = 23, size = 16928
[INFO 2017-08-21 22:37:41,588 layers.py:1960] output for __conv_1__: c = 32, h = 21, w = 21, size = 14112
[INFO 2017-08-21 22:37:41,590 layers.py:1960] output for __conv_2__: c = 64, h = 21, w = 21, size = 28224
[INFO 2017-08-21 22:37:41,591 layers.py:2050] output for __pool_0__: c = 64, h = 10, w = 10, size = 6400
[INFO 2017-08-21 22:37:41,592 layers.py:1960] output for __conv_3__: c = 80, h = 10, w = 10, size = 8000
[INFO 2017-08-21 22:37:41,593 layers.py:1960] output for __conv_4__: c = 192, h = 8, w = 8, size = 12288
[INFO 2017-08-21 22:37:41,595 layers.py:2050] output for __pool_1__: c = 192, h = 4, w = 4, size = 3072
paddle中的pool_1 layer 将size从8压到4
tensorflow:
DEBUG 2017-08-22 11:27:07.000929: model.py: 210 Conv2d_4a_3x3: Tensor("AttentionOcr_v1/conv_tower_fn/INCE/InceptionV3_6/Conv2d_4a_3x3/Relu:0", shape=(32, 8, 92, 192), dtype=float32)
DEBUG 2017-08-22 11:27:08.000167: model.py: 213 MaxPool_5a_3x3: Tensor("AttentionOcr_v1/conv_tower_fn/INCE/InceptionV3_7/MaxPool_5a_3x3/MaxPool:0", shape=(32, 3, 45, 192), dtype=float32)
tensorflow中pooling 将size从8压到3
根据计算输出的size = (8-3)/2 + 1 = 3.5 这里paddle为上取整,tensorflow为下取整,paddle可否也能设置支持下取整,thx~~~