codecamp

TensorFlow函数:tf.image.image_gradients

tf.image.image_gradients函数

tf.image.image_gradients(image)

定义在:tensorflow/python/ops/image_ops_impl.py.

返回每个颜色通道的图像渐变 (dy、dx).

两个输出张量都具有与输入相同的形状:[batch_size,h,w,d].渐变值被组织成使得[I(x + 1,y) - I(x,y)]位于位置(x,y)中.这意味着dy在最后一行中总是有零,并且dx在最后一列中总是有零.

参数:

  • image:形状为[batch_size,h,w,d]的张量.

返回:

保持垂直和水平图像梯度(1阶有限差分)的一对张量(dy,dx).

可能引发的异常:

  • ValueError:如果image不是4维张量.
TensorFlow函数:tf.image.hsv_to_rgb
TensorFlow函数:tf.image.is_jpeg
温馨提示
下载编程狮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; }