Browse Source

Pre Merge pull request !146 from 董铎/development

pull/146/MERGE
董铎 Gitee 5 years ago
parent
commit
684b04024d
1 changed files with 11 additions and 0 deletions
  1. +11
    -0
      parser/tensorflow/tensorflow_auto_mapping_parser_adapter.cc

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

@@ -56,6 +56,17 @@ Status TensorFlowAutoMappingParserAdapter::ParseParams(const Message *op_src, ge
}
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
if (op_dest->GetType() == IDENTITYN) {
uint32_t dynamic_tensor_num = 0;


Loading…
Cancel
Save