Browse Source

fixed coverity warning

pull/1992/head
zhao-lupeng 3 years ago
parent
commit
b0c15e70b2
1 changed files with 4 additions and 1 deletions
  1. +4
    -1
      ge/graph/load/model_manager/davinci_model.cc

+ 4
- 1
ge/graph/load/model_manager/davinci_model.cc View File

@@ -2137,7 +2137,10 @@ void DavinciModel::GetModelAttr(vector<string> &out_shape_info) const {
}

void DavinciModel::SetInputDimsInfo(const vector<int64_t> &input_dims, Format &format, ShapeDescription &shape_info) {
uint32_t n, c, h, w;
uint32_t n;
uint32_t c;
uint32_t h;
uint32_t w;
n = format == FORMAT_NHWC ? NHWC_DIM_N : NCHW_DIM_N;
c = format == FORMAT_NHWC ? NHWC_DIM_C : NCHW_DIM_C;
h = format == FORMAT_NHWC ? NHWC_DIM_H : NCHW_DIM_H;


Loading…
Cancel
Save