Have a look at this answer: https://stackoverflow.com/questions/34097281/how-can-i-convert-a-tensor-into-a-numpy-array-in-tensorflow - it is relatively straightforward to convert to an array, from which you can use `list()` to convert to a list
– 4Oh4Nov 27 '17 at 13:09
Possible duplicate of [How can I convert a tensor into a numpy array in TensorFlow?](https://stackoverflow.com/questions/34097281/how-can-i-convert-a-tensor-into-a-numpy-array-in-tensorflow)
– SunreefNov 27 '17 at 13:13
1 Answers1
12
l = tf.Variable([0, 1, 2, 3]).numpy().tolist()
type(l)
>>> list
l
>>> [0, 1, 2, 3]
This method lets convert to list not only 1D tensor, but also any other shape