TensorFlow 算術運算符
TensorFlow 提供了幾種操作,您可以使用它們將基本算術運算符添加到圖形中。
- tf.add
- tf.subtract
- tf.multiply
- tf.scalar_mul
- tf.div
- tf.divide
- tf.truediv
- tf.floordiv
- tf.realdiv
- tf.truncatediv
- tf.floor_div
- tf.truncatemod
- tf.floormod
- tf.mod
- tf.cross
TensorFlow 基本數學函數
TensorFlow 提供了幾種可用於向圖形添加基本數學函數的操作。
- tf.add_n
- tf.abs
- tf.negative
- tf.sign
- tf.reciprocal
- tf.square
- tf.round
- tf.sqrt
- tf.rsqrt
- tf.pow
- tf.exp
- tf.expm1
- tf.log
- tf.log1p
- tf.ceil
- tf.floor
- tf.maximum
- tf.minimum
- tf.cos
- tf.cosh
- tf.sin
- tf.lbeta
- tf.tan
- tf.acos
- tf.asin
- tf.atan
- tf.lgamma
- tf.digamma
- tf.erf
- tf.erfc
- tf.squared_difference
- tf.igamma
- tf.igammac
- tf.zeta
- tf.polygamma
- tf.betainc
- tf.rint
TensorFlow 矩陣數學函數
TensorFlow 提供了幾種操作,您可以使用它們將曲線上的線性代數函數添加到圖形中。
- tf.diag
- tf.diag_part
- tf.trace
- tf.transpose
- tf.eye
- tf.matrix_diag
- tf.matrix_diag_part
- tf.matrix_band_part
- tf.matrix_set_diag
- tf.matrix_transpose
- tf.matmul
- tf.norm
- tf.matrix_determinant
- tf.matrix_inverse
- tf.cholesky
- tf.cholesky_solve
- tf.matrix_solve
- tf.matrix_triangular_solve
- tf.matrix_solve_ls
- tf.qr
- tf.self_adjoint_eig
- tf.self_adjoint_eigvals
- tf.svd
TensorFlow 張量數學函數
TensorFlow 提供可用於向圖形添加張量函數的操作。
TensorFlow 復數函數
TensorFlow 提供了多種操作,您可以使用它們將復數函數添加到圖形中。
TensorFlow 減少張量的計算
TensorFlow 提供了幾種操作,您可以使用這些操作來執行減少張量的各種維度的常規數學計算。
- tf.reduce_sum
- tf.reduce_prod
- tf.reduce_min
- tf.reduce_max
- tf.reduce_mean
- tf.reduce_all
- tf.reduce_any
- tf.reduce_logsumexp
- tf.count_nonzero
- tf.accumulate_n
- tf.einsum
TensorFlow 張量掃描
TensorFlow 提供了幾種操作,您可以使用它們在張量的一個軸上執行掃描(運行總計)。
分段
TensorFlow 提供了幾種可用於在張量片段上執行常規數學計算的操作。這里,分割是沿着第一維度的張量的分割,即它定義從第一維度到的映射 segment_ids.segment_ids 張量應該是第一尺寸的大小,d0與在范圍內的連續的ID 0到k,在那里 k<d0。特別地,矩陣張量的分割是行到段的映射。
例如:
c = tf.constant([[1,2,3,4], [-1,-2,-3,-4], [5,6,7,8]]) tf.segment_sum(c, tf.constant([0, 0, 1])) ==> [[0 0 0 0] [5 6 7 8]]
- tf.segment_sum
- tf.segment_prod
- tf.segment_min
- tf.segment_max
- tf.segment_mean
- tf.unsorted_segment_sum
- tf.sparse_segment_sum
- tf.sparse_segment_mean
- tf.sparse_segment_sqrt_n
序列比較和索引
TensorFlow 提供了幾種操作,您可以使用它們將序列比較和索引提取添加到圖形中.您可以使用這些操作來確定序列差異,並確定張量中特定值的索引.
- tf.argmin
- tf.argmax
- tf.setdiff1d
- tf.where
- tf.unique
- tf.edit_distance
- tf.invert_permutation