TF Ops (Part 2)
Know about common TF ops performed on tensors, and learn about linear algebra operations supported by the TF framework.
We'll cover the following
Common TF ops
Here, we discuss some important TF ops applied to tensors. These include the following:
tf.transpose()
: This is for taking the transpose of a tensor.tf.matmul()
: This is for matrix (tensor) multiplication.tf.reshape()
: This is to change the shape of the tensor.tf.reduce_mean()
: This is for reducing a tensor using its mean (equivalent tonp.mean()
in NumPy).tf.reduce_sum()
: This is for reducing a tensor using its sum (equivalent tonp.sum()
in NumPy).tf.reduce_max()
: This is for reducing a tensor using its maximum value (equivalent tonp.max()
in NumPy).tf.squeeze()
: This is to remove dimensions of size 1 from a tensor.tf.slice()
: This is to extract a slice of the specified size from an input tensor.tf.tile()
: This is for tiling a tensor a number of times along each axis as specified by some multiple.
Get hands-on with 1400+ tech skills courses.