In numpy, V.shape gives a tuple of ints of dimensions of V.
V.shape
In tensorflow V.get_shape().as_list() gives a list of integers of the dimensions of
V.get_shape().as_list()
Previous answers got you list of torch.Size Here is how to get list of ints
listofints = [int(x) for x in tensor.shape]