TensorFlow:useful operators


  • tf.add(x, y) Add two tensors of the same type, x + y
  • tf.subtract(x, y) Subtract tensors of the same type, x - y
  • tf.multiply(x, y) Multiply two tensors element-wise
  • tf.pow(x, y) Take the element-wise power of x to y
  • tf.exp(x) Equivalent to pow(e, x), where e is Euler’s number (2.718…)
  • tf.sqrt(x) Equivalent to pow(x, 0.5)
  • tf.div(x, y) Take the element-wise division of x and y
  • tf.truediv(x, y) Same as tf.div, except casts the arguments as a float
  • tf.floordiv(x, y) Same as truediv, except rounds down the final answer into an integer
  • tf.mod(x, y) Takes the element-wise remainder from division

你可能感兴趣的:(TensorFlow:useful operators)