Browse Source

Fix empty bug

pull/147/head
dongduo 5 years ago
parent
commit
45661bb58a
1 changed files with 10 additions and 0 deletions
  1. +10
    -0
      parser/tensorflow/tensorflow_auto_mapping_parser_adapter.cc

+ 10
- 0
parser/tensorflow/tensorflow_auto_mapping_parser_adapter.cc View File

@@ -55,6 +55,16 @@ Status TensorFlowAutoMappingParserAdapter::ParseParams(const Message *op_src, ge
return FAILED; return FAILED;
} }
op.BreakConnect(); op.BreakConnect();
if (op_dest->GetType() == EMPTY) {
domi::tensorflow::AttrValue attr;
if (TensorFlowUtil::FindAttrValue(node, kShapeAttrDtype, attr)) {
ge::DataType data_type = domi::TensorAssign::ConvertTensorflowDataType(static_cast<uint32_t>(attr.type()));
AttrUtils::SetInt(op_dest, kShapeAttrDtype, data_type);
GELOGD("Get dtype:%d success.", data_type);
} else {
GELOGW("Get dtype failed!");
}
}


// add dynamic input/output // add dynamic input/output
if (op_dest->GetType() == IDENTITYN) { if (op_dest->GetType() == IDENTITYN) {


Loading…
Cancel
Save