February 2018
Intermediate to advanced
450 pages
11h 27m
English
Operations are nodes that represent mathematical operations over the tensors on a graph. These operations can be any kind of functions, like add and subtract tensors, or maybe an activation function.
tf.matmul, tf.add, and tf.nn.sigmoid are some of the operations in TensorFlow. These are like functions in Python, but operate directly over tensors and each one does a specific thing.
Other operations can be easily found at: https://www.tensorflow.org/api_guides/python/math_ops.
Let's play around with some of these operations:
a = tf.constant([5])b = tf.constant([2])c = tf.add(a,b)d = tf.subtract(a,b)with tf.Session() as session: result = session.run(c) print 'c =: %s' % result result = session.run(d) print 'd =: %s' % result
Output: ...
Read now
Unlock full access