keep_dtype_scope

函数原型

def keep_dtype_scope()

功能说明

指定哪些算子保持原有精度。

使用约束

算子精度模式为保持原图精度(即precision_mode指定为must_keep_origin_dtype)时,该接口不生效。

参数说明

无。

返回值

无。

调用示例

with npu_scope.keep_dtype_scope(): 
    X = tf.conv2d(a)