codecamp

TensorFlow函数教程:tf.lite.OpHint.OpHintArgumentTracker

tf.lite.OpHint.OpHintArgumentTracker函数

类 OpHintArgumentTracker

别名:

  • 类 tf.contrib.lite.OpHint.OpHintArgumentTracker
  • 类 tf.lite.OpHint.OpHintArgumentTracker

定义在:tensorflow/lite/python/op_hint.py

从概念上跟踪“OpHint函数”的参数索引。

这些函数的输入和参数都使用类的实例,因此它们可以具有独立的编号。

__init__
__init__(
    function_name,
    unique_function_id,
    node_name_prefix,
    attr_name
)

初始化ophint参数。

参数:

  • function_name:跟踪参数的函数的名称。
  • unique_function_id:跟踪参数的函数的UUID。
  • node_name_prefix:如何命名创建的标识。
  • attr_name:用于存储此提示的索引的属性的名称。即FUNCTION_INPUT_INDEX或FUNCTION_OUTPUT_INDEX

方法

add
add(
    arg,
    tag=None,
    name=None,
    aggregate=None,
    index_override=None
)

返回输入张量的包装张量作为参数。

参数:

  • arg:TensorFlow张量应该被认为是一个参数。
  • tag:String标记,用于标识应打包的参数。
  • name:参数名称。这包含在Identity提示操作名称中。
  • aggregate:聚合战略。可接受的值为OpHint.AGGREGATE_FIRST,OpHint.AGGREGATE_LAST和OpHint.AGGREGATE_STACK。注意,聚合仅在指定标记时有效。
  • index_override:指定最终存根中的输入/输出索引。即,add(arg0,index = 1); add(arg1,index = 0)将使最终存根作为stub_func(inputs[arg1, arg0], outputs=[]),而不是基于默认的调用顺序的排序。

返回:

表示包装参数的张量。

可能引发的异常:

  • ValueError:当指数不一致时。
TensorFlow函数教程:tf.lite.OpHint
TensorFlow函数教程:tf.lite.OpsSet
温馨提示
下载编程狮App,免费阅读超1000+编程语言教程
取消
确定
目录

TensorFlow 函数介绍

TensorFlow 函数模块:tf

TensorFlow的image模块

TensorFlow使用之tf.io

TensorFlow使用之tf.keras

TensorFlow函数教程:tf.keras.applications

TensorFlow函数教程:tf.keras.backend

TensorFlow使用之tf.metrics

TensorFlow使用之tf.nn

TensorFlow使用之tf.python_io

TensorFlow 功能函数

关闭

MIP.setData({ 'pageTheme' : getCookie('pageTheme') || {'day':true, 'night':false}, 'pageFontSize' : getCookie('pageFontSize') || 20 }); MIP.watch('pageTheme', function(newValue){ setCookie('pageTheme', JSON.stringify(newValue)) }); MIP.watch('pageFontSize', function(newValue){ setCookie('pageFontSize', newValue) }); function setCookie(name, value){ var days = 1; var exp = new Date(); exp.setTime(exp.getTime() + days*24*60*60*1000); document.cookie = name + '=' + value + ';expires=' + exp.toUTCString(); } function getCookie(name){ var reg = new RegExp('(^| )' + name + '=([^;]*)(;|$)'); return document.cookie.match(reg) ? JSON.parse(document.cookie.match(reg)[2]) : null; }