更详细的参数解释查阅interp_layer.cpp。
prototxt中的用法:
layer{
bottom:"input"
top:"output"
name:"interp_layer"
type:"Interp"
interp_param{
shrink_factor:4
zoom_factor:3
pad_beg:0
pad_end:0
}interp_layer.cpp相关片段
#读入图片的高度和宽度
height_in_ = bottom[0]->height();
width_in_ = bottom[0]->width();
#根据设定参数调整后的高度,pad_beg,pad_end只能设置成0及0以下。
height_in_eff_ = height_in_ + pad_beg_ + pad_end_;
width_in_eff_ = width_in_ + pad_beg_ + pad_end_;
#interp的顺序是先缩小,再放大
height_out_ = (height_in_eff_ - 1) / shrink_factor + 1;
width_out_ = (width_in_eff_ - 1) / shrink_factor + 1;
height_out_ = height_out_ + (height_out_ - 1) * (zoom_factor - 1);
width_out_ = width_out_ + (width_out_ - 1) * (zoom_factor - 1);
本文介绍了在prototxt中如何配置Interp层,详细解释了各参数的作用,包括缩放因子、放大因子以及填充参数等,并展示了这些参数如何影响输入图片尺寸的变化。
层的理解&spm=1001.2101.3001.5002&articleId=80820658&d=1&t=3&u=183cc495fbeb4b30acde9cc67c57ca26)
6693

被折叠的 条评论
为什么被折叠?



