Browse Source

Bugfix:dynamic multibatch lack of check input format

pull/350/head
wxl 4 years ago
parent
commit
fa7fc05c0a
2 changed files with 8 additions and 4 deletions
  1. +7
    -3
      ge/graph/preprocess/multi_batch_options.cc
  2. +1
    -1
      metadef

+ 7
- 3
ge/graph/preprocess/multi_batch_options.cc View File

@@ -573,11 +573,15 @@ bool CheckDynamicImageSizeShape(const vector<int64_t> &shape, const string &data
if (input_format == "NCHW") {
height = shape[NCHW_DIM_H];
width = shape[NCHW_DIM_W];
}

if (input_format == "NHWC") {
} else if (input_format == "NHWC") {
height = shape[NHWC_DIM_H];
width = shape[NHWC_DIM_W];
} else {
ErrorManager::GetInstance().ATCReportErrMessage("E10001", {"parameter", "value", "reason"}, {"--input_format",
input_format, "only support nchw and nhwc!"});
GELOGE(ge::PARAM_INVALID, "Invalid value for %s[%s], %s", "--input_format", input_format.c_str(),
"only support nchw and nhwc!");
return false;
}

if (height == kDynmaicDims && width == kDynmaicDims &&


+ 1
- 1
metadef

@@ -1 +1 @@
Subproject commit c9b6960725036291ed2328f5751beb4f01247526
Subproject commit 4aabad33f2a0ba7380d4b0baf96712256dff53e7

Loading…
Cancel
Save