提交 2f40da09 编写于 作者: W whs 提交者: GitHub

Merge pull request #3955 from wanghaoshuang/fix_warning

Fix warning log in switch order layer
...@@ -32,11 +32,11 @@ bool SwitchOrderLayer::init(const LayerMap& layerMap, ...@@ -32,11 +32,11 @@ bool SwitchOrderLayer::init(const LayerMap& layerMap,
outDims_ = TensorShape(4); outDims_ = TensorShape(4);
auto& reshape_conf = config_.reshape_conf(); auto& reshape_conf = config_.reshape_conf();
for (size_t i = 0; i < reshape_conf.heightaxis_size(); i++) { for (int i = 0; i < reshape_conf.height_axis_size(); i++) {
heightAxis_.push_back(reshape_conf.heightaxis(i)); heightAxis_.push_back(reshape_conf.height_axis(i));
} }
for (size_t i = 0; i < reshape_conf.widthaxis_size(); i++) { for (int i = 0; i < reshape_conf.width_axis_size(); i++) {
widthAxis_.push_back(reshape_conf.widthaxis(i)); widthAxis_.push_back(reshape_conf.width_axis(i));
} }
createFunction(nchw2nhwc_, "NCHW2NHWC", FuncConfig()); createFunction(nchw2nhwc_, "NCHW2NHWC", FuncConfig());
createFunction(nhwc2nchw_, "NHWC2NCHW", FuncConfig()); createFunction(nhwc2nchw_, "NHWC2NCHW", FuncConfig());
......
...@@ -2019,10 +2019,10 @@ TEST(Layer, SwitchOrderLayer) { ...@@ -2019,10 +2019,10 @@ TEST(Layer, SwitchOrderLayer) {
img->set_img_size_y(16); img->set_img_size_y(16);
ReshapeConfig* reshape = config.layerConfig.mutable_reshape_conf(); ReshapeConfig* reshape = config.layerConfig.mutable_reshape_conf();
reshape->add_heightaxis(0); reshape->add_height_axis(0);
reshape->add_heightaxis(1); reshape->add_height_axis(1);
reshape->add_heightaxis(2); reshape->add_height_axis(2);
reshape->add_widthaxis(3); reshape->add_width_axis(3);
// config softmax layer // config softmax layer
config.layerConfig.set_type("switch_order"); config.layerConfig.set_type("switch_order");
......
...@@ -288,8 +288,8 @@ message PadConfig { ...@@ -288,8 +288,8 @@ message PadConfig {
} }
message ReshapeConfig { message ReshapeConfig {
repeated uint32 heightAxis = 1; repeated uint32 height_axis = 1;
repeated uint32 widthAxis = 2; repeated uint32 width_axis = 2;
} }
message MultiBoxLossConfig { message MultiBoxLossConfig {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册