将Format类型值转化为字符串表达。
从GCC 5.1版本开始,libstdc++为了更好的实现C++11规范,更改了std::string和std::list的一些接口,导致新老版本ABI不兼容。所以推荐使用FormatToAscendString替代本接口。
使用该接口需要包含type_utils.h头文件。
#include "graph/utils/type_utils.h"
std::string FormatToSerialString(const Format format);
转换后的Format字符串。
无
ge::Format format = ge::Format::FORMAT_NHWC; auto format_str = FormatToSerialString(format); // "NHWC"