I want to change the shape/dimension of tensor. For example,
x = tf.constant([1, 2, 3])
Then I want to get y = tf.constant([1,1], [2,2], [3,3]).
How can I get the new y
transformation?
I have run the code
y = tf.map_fn(lambda e : (e, e), x)
But error that occured :
ValueError: The two structures don't have the same nested structure.