From fa7fc05c0a7bc65bdcf97bef6e5d5119d37ef0a0 Mon Sep 17 00:00:00 2001 From: wxl Date: Fri, 20 Nov 2020 16:29:36 +0800 Subject: [PATCH] Bugfix:dynamic multibatch lack of check input format --- ge/graph/preprocess/multi_batch_options.cc | 10 +++++++--- metadef | 2 +- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/ge/graph/preprocess/multi_batch_options.cc b/ge/graph/preprocess/multi_batch_options.cc index c168e077..9c4412dc 100644 --- a/ge/graph/preprocess/multi_batch_options.cc +++ b/ge/graph/preprocess/multi_batch_options.cc @@ -573,11 +573,15 @@ bool CheckDynamicImageSizeShape(const vector &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 && diff --git a/metadef b/metadef index c9b69607..4aabad33 160000 --- a/metadef +++ b/metadef @@ -1 +1 @@ -Subproject commit c9b6960725036291ed2328f5751beb4f01247526 +Subproject commit 4aabad33f2a0ba7380d4b0baf96712256dff53e7