import tensorflow as tf
import os
# Just disables the warning, doesn't enable AVX/FMA
os.environ['TF_CPP_MIN_LOG_LEVEL'] = '2'
matrix1 = tf.constant([[3., 3.0]])
matrix2 = tf.constant([[2.0],[2.0]])
product = tf.matmul(matrix1, matrix2)
print(product.numpy())
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
<ipython-input-3-c077a63dce6d> in <module>()
3 product = tf.matmul(matrix1, matrix2)
4
----> 5 print(product.numpy())
AttributeError: 'Tensor' object has no attribute 'numpy'
# The above option is applicable only in Tensorflow 2.0
'1.13.1'