TensorFlow函数
-
tf.add(x, y, name=None) 求和
-
tf.sub(x, y, name=None) 减法
-
tf.mul(x, y, name=None) 乘法 multiply
-
tf.div(x, y, name=None) 除法
-
tf.mod(x, y, name=None) 取模
-
tf.abs(x, name=None) 求绝对值
-
tf.neg(x, name=None) 取负 (y = -x).negative
-
tf.sign(x, name=None) 返回符号 y = sign(x) = -1 if x < 0; 0 if x == 0; 1 if x > 0.
-
tf.inv(x, name=None) 取反
-
tf.square(x, name=None) 计算平方 (y = x * x = x^2).
-
tf.round(x, name=None) 舍入最接近的整数# ‘a’ is [0.9, 2.5, 2.3, -4.4] tf.round(a) ==> [ 1.0, 3.0, 2.0, -4.0 ]
-
tf.sqrt(x, name=None) 开根号 (y = \sqrt{x} = x^{1/2}).
-
tf.pow(x, y, name=None) 幂次方 # tensor ‘x’ is [[2, 2], [3, 3]]# tensor ‘y’ is [[8, 16], [2, 3]] tf.pow(x, y) ==> [[256, 65536], [9, 27]]
-
tf.exp(x, name=None) 计算e的次方
-
tf.log(x, name=None) 计算log,一个输入计算e的ln,两输入以第二输入为底
-
tf.maximum(x, y, name=None) 返回最大值 (x > y ? x : y)
-
tf.minimum(x, y, name=None) 返回最小值 (x < y ? x : y)
-
tf.cos(x, name=None) 三角函数cosine
-
tf.sin(x, name=None) 三角函数sine
-
tf.tan(x, name=None) 三角函数tan
-
tf.atan(x, name=None) 三角函数ctan
浙公网安备 33010602011771号