1 参数设置
message UpsampleParameter {
// DEPRECATED. No need to specify upsampling scale factors when
// exact output shape is given by upsample_h, upsample_w parameters.
optional uint32 scale = 1 [default = 2];
// DEPRECATED. No need to specify upsampling scale factors when
// exact output shape is given by upsample_h, upsample_w parameters.
optional uint32 scale_h = 2;
// DEPRECATED. No need to specify upsampling scale factors when
// exact output shape is given by upsample_h, upsample_w parameters.
optional uint32 scale_w = 3;
// DEPRECATED. Specify exact output height using upsample_h. This
// parameter only works when scale is 2
optional bool pad_out_h = 4 [default = false];
// DEPRECATED. Specify exact output width using upsample_w. This
// parameter only works when scale is 2
optional bool pad_out_w = 5 [default = false];
optional uint32 upsample_h = 6;
optional uint32 upsample_w = 7;
}
可设置参数为:scale
scale_h scale_w
pad_out_h pad_out_w
upsample_h upsample_w
2 top层特征图大小计算
(1)先判断是否指定 upsample_hupsample_w,如果指定,大小为指定大小,否则(2)
(2)判断是否指定 scale_h, 如果未指定, scale_h_ = scale_w_ = scale,否则(3)
(3)scale_h_ = scale_h scale_w_=scale_w