codecamp

TensorFlow 计算张量的绝对值

tf.abs


abs ( 
    x , 
    name = None
 )

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

参考指南:数学>基本数学函数

计算张量的绝对值.

给定一个实数的张量 x,该操作返回一个包含每个元素的绝对值的张量 x.例如,如果 x 是输入元素,y 是输出元素,则此操作将计算\\(y = | x | \\).

ARGS:

  • x:一个类型为 float32,float64,int32,或 int64 的 Tensor 或 SparseTensor.
  • name:操作的名称(可选).

返回:

与绝对值 x 有相同的大小和类型 的一个 Tensor 或 SparseTensor .


TensorFlow函数教程:tf.lite.toco_convert
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; }