Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save Libardo1/7ba017df0739c1c908d2b33b834f0a6b to your computer and use it in GitHub Desktop.

Select an option

Save Libardo1/7ba017df0739c1c908d2b33b834f0a6b to your computer and use it in GitHub Desktop.
import tensorflow as tf
tf.add(1, 2)
# 3
tf.sub(2, 1)
# 1
tf.mul(2, 2)
# 4
tf.div(2, 2)
# 1
tf.mod(4, 5)
# 4
tf.pow(3, 2)
# 9
# x < y
tf.less(1, 2)
# True
# x <= y
tf.less_equal(1, 1)
# True
tf.greater(1, 2)
# False
tf.greater_equal(1, 2)
# False
tf.logical_and(True, False)
# False
tf.logical_or(True, False)
# True
tf.logical_xor(True, False)
# True
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment