Browse Source

Pre Merge pull request !664 from yangxiaorun/ge_dev

pull/664/MERGE
yangxiaorun Gitee 3 years ago
parent
commit
60b38918b2
No known key found for this signature in database GPG Key ID: 173E9B9CA92EEF8F
2 changed files with 4 additions and 4 deletions
  1. +1
    -1
      parser/caffe/caffe_parser.cc
  2. +3
    -3
      parser/tensorflow/tensorflow_parser.cc

+ 1
- 1
parser/caffe/caffe_parser.cc View File

@@ -1641,7 +1641,7 @@ Status CaffeModelParser::ReorderInput(domi::caffe::NetParameter &net) const {
continue;
}
for (const auto &it : move_input_vec) {
if (it.moveType == domi::OMG_INPUT_REORDER) {
if (it.moveType == domi::RemoveInputType::OMG_INPUT_REORDER) {
auto inputs = layer->bottom();
if (static_cast<size_t>(inputs.size()) != it.input_order.size()) {
REPORT_INNER_ERROR("E19999", "Size of input is mismatched, check invalid,"


+ 3
- 3
parser/tensorflow/tensorflow_parser.cc View File

@@ -3331,7 +3331,7 @@ Status TensorFlowModelParser::OptimizeConstNodes4CustomOp(domi::tensorflow::Grap
// solve the problem of protobuf index less current_size.
GE_IF_BOOL_EXEC(current_node->input_size() == 0, GELOGI("Input size is 0, already optimized"); continue);

if (it.moveType == domi::OMG_REMOVE_TYPE_WITH_COND) {
if (it.moveType == domi::RemoveInputType::OMG_REMOVE_TYPE_WITH_COND) {
domi::tensorflow::AttrValue attr_value;
GE_IF_BOOL_EXEC(!(ge::TensorFlowUtil::FindAttrValue(current_node, it.attrName, attr_value)),
REPORT_INNER_ERROR("E19999", "Op:%s register AttrName[%s] has no value, check invalid",
@@ -3339,10 +3339,10 @@ Status TensorFlowModelParser::OptimizeConstNodes4CustomOp(domi::tensorflow::Grap
GELOGE(INTERNAL_ERROR, "AttrName[%s] has no value!", it.attrName.c_str());
return PARAM_INVALID);
GE_IF_BOOL_EXEC(attr_value.b() == it.attrValue, unused_inputs.insert(move_index));
} else if (it.moveType == domi::OMG_REMOVE_INPUT_WITH_ORIGINAL_TYPE && it.originalType == current_op_name) {
} else if (it.moveType == domi::RemoveInputType::OMG_REMOVE_INPUT_WITH_ORIGINAL_TYPE && it.originalType == current_op_name) {
GELOGD("Input %s:%d will be removed.", current_op_name.c_str(), move_index);
unused_inputs.insert(move_index);
} else if (it.moveType == domi::OMG_INPUT_REORDER) {
} else if (it.moveType == domi::RemoveInputType::OMG_INPUT_REORDER) {
auto inputs = current_node->input();
if (static_cast<size_t>(inputs.size()) != it.input_order.size()) {
REPORT_INNER_ERROR("E19999", "Input size of node:%s(%s) is mismatched, new order size:%zu, input size:%d",


Loading…
Cancel
Save