在pywrap中找不到Tensorflow TFE\u Py\u FastPathExecute变量_张量流.py

2024-05-28 19:55:29 发布

您现在位置:Python中文网/ 问答频道 /正文

我正在阅读tensorflow.python.ops包的gen_nn_ops.py中的LeakyRelu的源代码。其中的函数用八个参数调用_pywrap_tensorflow.TFE_Py_FastPathExecute。你知道吗

但是,TFE_Py_FastPathExecute成员在pywrap_tensorflow.py中不存在。它是从哪里来的?你知道吗


Tags: 函数py参数源代码tensorflow成员nnops
1条回答
网友
1楼 · 发布于 2024-05-28 19:55:29

pywrap_tfe.i行286-290中读:

// Since we wanted to have a function with a variable length of arguments, we
// used the native Python/C interface directly (which by default supports
// passing all arguments as a tuple).
%native(TFE_Py_FastPathExecute) TFE_Py_FastPathExecute_C;

这很可能引用了pywrap_tfe_src.cc,我们在第1832-2132行中找到了TFE\u Py\u fastpatheexecute\u C,从 PyObject* TFE_Py_FastPathExecute_C(PyObject*, PyObject* args)。你知道吗

相关问题 更多 >

    热门问题