I am trying to get characters in a string tensor to predict character level. Fundamental truths are words in which each character has an identifier in the dictionary. I have a tensor corresponding to the length of the string.
Now I have to get every character in the string tensor. After checking the relevant messages, a simple search may be as follows. Example string "This"
a= tf.constant("This",shape=[1])
b=tf.string_split(a,delimiter="").values
Now I want to create a line with spaces between the letters "This" ie "T h i s". I need distance both at the beginning and at the end. How to do it?
I tried iterating through the characters as below
for i in xrange(b.dense_shape[1]):
x=b.values[i]
But the cycle expects the whole, not the tensor.
, ? , ( tf.string_split). .