print('Datatype of every element:', A.dtype)
print('Number of dimensions (rank):', A.ndim)
print('Shape of tensor:', A.shape)
print('Elements along the 0 axis:', A.shape[0])
print('Elements along the last axis:', [...])
print('Total number of elements:', tf.size(A))
print('Total number of elements:', tf.size(A).numpy())
Output:
Datatype of every element: <dtype: 'int64'>
Number of dimensions (rank): 4
Shape of tensor: (2, 3, 4, 5)
Elements along the 0 axis: 2
Elements along the last axis: 5
Total number of elements: tf.Tensor(120, shape=(), dtype=int32)
Total number of elements: 120