I run the following code in Google Colab (TensorFlow version: 2.3.0, Python version: 3.6.9) and got an error:
import tensorflow as tf s = tf.constant(3*tf.mat