代码拉取完成,页面将自动刷新
#!/usr/bin/env python3
import sys
from tensorflow.python import _pywrap_python_op_gen
from tensorflow.python.client import pywrap_tf_session as py_tf
lib_file = sys.argv[1]
lib_handle = py_tf.TF_LoadLibrary(lib_file)
lib_ops = py_tf.TF_GetOpList(lib_handle)
wrapper_codes = _pywrap_python_op_gen.GetPythonWrappers(lib_ops).decode()
source_files = sys.argv[2:]
if source_files:
marker = "This file is MACHINE GENERATED! Do not edit."
source_line = f"Original C++ source file: {', '.join(source_files)}"
wrapper_codes = wrapper_codes.replace(marker, f"{marker}\n{source_line}", 1)
print(wrapper_codes)
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。