Simple Multiplication

import tensorflow as tf

import os

# Just disables the warning, doesn't enable AVX/FMA
os.environ['TF_CPP_MIN_LOG_LEVEL'] = '2'
a = tf.random_normal([2, 2])
b = tf.random_normal([2, 2])
a
<tf.Tensor 'random_normal_3:0' shape=(2, 2) dtype=float32>
c = tf.matmul(a, b)
c
<tf.Tensor 'MatMul_1:0' shape=(2, 2) dtype=float32>
print(c)
Tensor("MatMul_1:0", shape=(2, 2), dtype=float32)
sess = tf.Session()
c_val = sess.run(c)
c_val
array([[-1.2824252, -0.3110683],
       [-2.3952909,  0.7716379]], dtype=float32)
c_val.shape
(2, 2)
c_val.ndim
2
c.shape.as_list()
[2, 2]