From 8ff6f9556695c120c0bff76bbf618fef17eaaac4 Mon Sep 17 00:00:00 2001 From: xuepeng Date: Fri, 16 Dec 2022 17:31:27 +0800 Subject: [PATCH] =?UTF-8?q?TFA=E9=BB=98=E8=AE=A4=E5=BC=80=E5=90=AFV2?= =?UTF-8?q?=E6=8E=A7=E5=88=B6=E6=B5=81=E5=92=8C=E8=B5=84=E6=BA=90=E7=B1=BB?= =?UTF-8?q?=E5=8F=98=E9=87=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tf_adapter/python/npu_bridge/__init__.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tf_adapter/python/npu_bridge/__init__.py b/tf_adapter/python/npu_bridge/__init__.py index 428dd33a0..302936a90 100644 --- a/tf_adapter/python/npu_bridge/__init__.py +++ b/tf_adapter/python/npu_bridge/__init__.py @@ -17,6 +17,11 @@ import atexit +import tensorflow + +print("Enable tensorflow control flow v2 and resource variables", flush=True) +tensorflow.enable_control_flow_v2() +tensorflow.enable_resource_variables() from npu_bridge.helper.helper import npu_bridge_handle from npu_bridge.helper.helper import version as __version__ from npu_bridge.helper import helper -- Gitee