|
|
|
@@ -134,16 +134,13 @@ Status TensorFlowDataParser::ParseInputFromUser(const Message *op_src, const ge: |
|
|
|
} |
|
|
|
|
|
|
|
Status TensorFlowDataParser::CheckInputShape(const std::string &name) { |
|
|
|
const ge::ParserContext &ctx = GetParserContext(); |
|
|
|
if (!ctx.is_dynamic_input) { |
|
|
|
for (uint32_t i = 0; i < user_input_dims_v.size(); i++) { |
|
|
|
// if input_shape has some placeholders, user should designate them. |
|
|
|
// dim i = 0, means empty tensor. |
|
|
|
// dim i = -1 or -2, means unknown shape. |
|
|
|
GE_CHK_BOOL_RET_STATUS(user_input_dims_v[i] >= kValidShapeMinValue, domi::PARAM_INVALID, |
|
|
|
"parse data node %s: shape contains placeholder ,but not designated by user", |
|
|
|
name.c_str()); |
|
|
|
} |
|
|
|
for (uint32_t i = 0; i < user_input_dims_v.size(); i++) { |
|
|
|
// if input_shape has some placeholders, user should designate them. |
|
|
|
// dim i = 0, means empty tensor. |
|
|
|
// dim i = -1 or -2, means unknown shape. |
|
|
|
GE_CHK_BOOL_RET_STATUS(user_input_dims_v[i] >= kValidShapeMinValue, domi::PARAM_INVALID, |
|
|
|
"parse data node %s: shape contains placeholder ,but not designated by user", |
|
|
|
name.c_str()); |
|
|
|
} |
|
|
|
return SUCCESS; |
|
|
|
} |
|
|
|
|