What is a TensorSpec? (Tensorflow 2.0)
TensorSpec is mostly used by tf.function to specify input signature. tf.function will create a graph for different input shapes and datatypes, but it is possible that your function graph is compatible with different shapes. As a performance optimization, You can optionally provide a signature so that no unnecessary graphs are created.