diff --git a/ge/offline/single_op_parser.cc b/ge/offline/single_op_parser.cc index 38ac5a39..2697d96b 100644 --- a/ge/offline/single_op_parser.cc +++ b/ge/offline/single_op_parser.cc @@ -205,7 +205,7 @@ void SetAttrValue(const Json &j, SingleOpAttr &attr) { // 2. value: 1, 3 ... if (j.at(kKeyType).get() == "data_type" && AttrValueIsString(j, kKeyValue)) { string type_str = j.at(kKeyValue).get(); - DataType dtype = GetValue(kDataTypeStringToEnum, type_str, DT_UNDEFINED); + DataType dtype = TypeUtils::SerialStringToDataType(type_str); attr.value.SetValue(dtype); return; }