Suppose I have a Tensorflow tensor. How do I get the dimensions (shape) of the tensor as integer values? I know there are two methods, tensor.get_shape() and
tensor.get_shape()
Another simple solution is to use map() as follows:
map()
tensor_shape = map(int, my_tensor.shape)
This converts all the Dimension objects to int
Dimension
int