codecamp

TensorFlow函数教程:tf.nn.quantized_conv2d

tf.nn.quantized_conv2d函数

tf.nn.quantized_conv2d(
    input,
    filter,
    min_input,
    max_input,
    min_filter,
    max_filter,
    strides,
    padding,
    out_type=tf.qint32,
    dilations=[1, 1, 1, 1],
    name=None
)

请参阅指南:神经网络>候选采样

在给定量化4D输入和滤波器张量的情况下计算2D卷积.

输入是量化张量,其中最低值表示相关最小值的实数,最高值表示最大值.这意味着您只能通过考虑返回的最小值和最大值来以相同的方式解释量化输出.

参数:

  • input:一个Tensor,必须是下列类型之一:qint8,quint8,qint32,qint16,quint16.
  • filter:一个Tensor,必须是下列类型之一:qint8,quint8,qint32,qint16,quint16.filter的input_depth维度必须与输入的深度维度匹配.
  • min_input:一个Tensor,类型为float32.最小量化输入值表示的浮点值.
  • max_input:一个Tensor,类型为float32.最大量化输入值表示的浮点值.
  • min_filter:一个Tensor,类型为float32.最小量化过滤器值表示的浮点值.
  • max_filter:一个Tensor,类型为float32.最大量化过滤器值表示的浮点值.
  • strides:ints列表.输入张量的每个维度的滑动窗口的步幅.
  • padding:string,可以是:"SAME", "VALID".要使用的填充算法的类型.
  • out_type:可选的tf.DType,可以是:tf.qint8, tf.quint8, tf.qint32, tf.qint16, tf.quint16.默认为tf.qint32.
  • dilations:可选ints的列表.默认为[1, 1, 1, 1].长度为4的1-D张量.input每个维度的膨胀系数.如果设置为k> 1,则该维度上的每个滤镜元素之间将有k-1个跳过的单元格.维度顺序由值data_format确定.批次和深度尺寸的扩张必须为1.
  • name:操作的名称(可选).

返回:

Tensor对象的元组(output,min_output,max_output).

  • output:一个Tensor,类型为out_type.
  • min_output:一个Tensor,类型为float32.
  • max_output:一个Tensor,类型为float32.
TensorFlow函数教程:tf.nn.quantized_avg_pool
TensorFlow函数教程:tf.nn.quantized_max_pool
温馨提示
下载编程狮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; }