Guest User

Untitled

a guest
Jan 20th, 2019
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.48 KB | None | 0 0
  1. import tensorflow as tf
  2.  
  3. print("Pythonic:")
  4. print(8 + 5)
  5. print(8 - 5)
  6. print(8 * 5)
  7. print(8 / 5)
  8. print(8**5)
  9. print(8 % 5)
  10. print(8 // 5)
  11.  
  12. x = tf.constant(8)
  13. y = tf.constant(5)
  14. tf_add = tf.add(x, y)
  15. tf_subtract = tf.subtract(x, y)
  16. tf_multiply = tf.multiply(x, y)
  17. tf_divide = tf.divide(x, y)
  18. tf_pow = tf.pow(x, y)
  19. tf_mod = tf.mod(x, y)
  20. tf_quotient = tf.div(x, y)
  21. print("TensorFlow:")
  22. print(tf_add)
  23. print(tf_subtract)
  24. print(tf_multiply)
  25. print(tf_divide)
  26. print(tf_pow)
  27. print(tf_mod)
  28. print(tf_quotient)
Add Comment
Please, Sign In to add comment