codecamp

TensorFlow函数教程:tf.lite.toco_convert

tf.lite.toco_convert函数

别名:

  • tf.contrib.lite.toco_convert
  • tf.lite.toco_convert
tf.lite.toco_convert(
    input_data,
    input_tensors,
    output_tensors,
    *args,
    **kwargs
)

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

使用TOCO转换模型。(弃用)

警告:此功能已被弃用。它将在以后的版本中删除。更新说明:改为使用lite.TFLiteConverter

通常,此函数用于将TensorFlow GraphDef转换为TFLite。可以通过提供转发到build_toco_convert_protos的参数来自定义转换。此功能已被弃用。请改用lite.TFLiteConverter。

参数:

  • input_data:输入数据(经常是sess.graph_def),
  • input_tensors:输入张量列表。使用foo.get_shape()和foo.dtype计算类型和shape。
  • output_tensors:输出张量列表(仅使用.name)。
  • *args:参考build_toco_convert_protos,
  • **kwargs:参考build_toco_convert_protos。

返回:

转换后的数据。例如,如果TFLite是目的地,那么这将是字节数组中的tflite flatbuffer。

可能引发的异常:

定义在build_toco_convert_protos。

TensorFlow函数教程:tf.lite.TocoConverter
TensorFlow 计算张量的绝对值
温馨提示
下载编程狮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; }