Skip to content

Instantly share code, notes, and snippets.

View camrongodbout's full-sized avatar

Camron Godbout camrongodbout

View GitHub Profile
import tensorflow as tf
tf.add(1, 2)
# 3
tf.sub(2, 1)
# 1
tf.mul(2, 2)
import tensorflow as tf
# create a constant 2X2 matrix
tensor_1 = tf.constant([[1., 2.], [3.,4]])
tensor_2 = tf.constant([[5.,6.],[7.,8.]])
# create a matrix multiplication operation
output_tensor = tf.matmul(tensor_1, tensor_2)