From 7e746b79b7b8ee3136d0fee9f1d061a263f2f317 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E5=87=8C?= Date: Wed, 20 Jul 2022 02:30:56 +0000 Subject: [PATCH 1/2] update TensorFlow/contrib/cv/BISIMULATION_ID2029_for_Tensorflow/grid_world.py. --- .../cv/BISIMULATION_ID2029_for_Tensorflow/grid_world.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/TensorFlow/contrib/cv/BISIMULATION_ID2029_for_Tensorflow/grid_world.py b/TensorFlow/contrib/cv/BISIMULATION_ID2029_for_Tensorflow/grid_world.py index c41aeaf55..df3aac9fe 100644 --- a/TensorFlow/contrib/cv/BISIMULATION_ID2029_for_Tensorflow/grid_world.py +++ b/TensorFlow/contrib/cv/BISIMULATION_ID2029_for_Tensorflow/grid_world.py @@ -582,7 +582,8 @@ class GridWorld(object): config_proto = tf.ConfigProto() custom_op = config_proto.graph_options.rewrite_options.custom_optimizers.add() custom_op.name = 'NpuOptimizer' - custom_op.parameter_map["precision_mode"].s = tf.compat.as_bytes("allow_fp32_to_fp16") + custom_op.parameter_map["precision_mode"].s = tf.compat.as_bytes("allow_mix_precision") + custom_op.parameter_map["customize_dtypes"].s = tf.compat.as_bytes("./matmul_setting.cfg") config = npu_config_proto(config_proto=config_proto) with tf.Session(config=config) as sess: summary_writer.add_graph(graph=tf.get_default_graph()) -- Gitee From 38e6f7b43433c38d80cfa6758663528327fa0f24 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E5=87=8C?= Date: Wed, 20 Jul 2022 02:35:50 +0000 Subject: [PATCH 2/2] add TensorFlow/contrib/cv/BISIMULATION_ID2029_for_Tensorflow/matmul_setting.cfg. --- .../cv/BISIMULATION_ID2029_for_Tensorflow/matmul_setting.cfg | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 TensorFlow/contrib/cv/BISIMULATION_ID2029_for_Tensorflow/matmul_setting.cfg diff --git a/TensorFlow/contrib/cv/BISIMULATION_ID2029_for_Tensorflow/matmul_setting.cfg b/TensorFlow/contrib/cv/BISIMULATION_ID2029_for_Tensorflow/matmul_setting.cfg new file mode 100644 index 000000000..3bf1b03dd --- /dev/null +++ b/TensorFlow/contrib/cv/BISIMULATION_ID2029_for_Tensorflow/matmul_setting.cfg @@ -0,0 +1,3 @@ +OpType::MatMulV2:InputDtype:float16,float16,float32,OutputDtype:float32 +OpType::BatchMatMul:InputDtype:float16,float16,OutputDtype:float32 +OpType::BatchMatMulV2:InputDtype:float16,float16,OutputDtype:float32 -- Gitee