In this section we'll look at how TensorFlow deals with strings.
So TensorFlow has this um TF strings module and which contains this different methods which you can
see right here.
And the way a TensorFlow string can be created is very easy.
So all we have is just the same syntax.
Let's say here we have TensorFlow tensor string TensorFlow constant.
So it's the same syntax.
And then in here if we have a 1D um tensor of strings you just have to say I am um and then uh and then
string.
So there we go.
We have I am a string.
We have tensor string.
And you see now that we have this tensor um, which is of type string, um, and it's a 1D tensor.
So we have a shape three.
Then here we have the actual um values in our string.
So we have I am uh and then string.
Then we have different methods which we could um, use.
So let's, let's take for example join.
It performs element wise concatenation of list of uh of a list of string tensors.
So we just need to specify the separator.
And that's fine.
So we have um tensor string.
And then we have this list.
And you see how it generates the output which is now concatenated.
So let's let's test this out.
Let's say we have um let's let's get back and check out the signal or the the syntax again.
So TensorFlow strings join is fine.
We have TensorFlow strings join.
We have tensor tensor string.
And then we have the separator uh which we could put set to plus.
So let's run that and see what we get.
See I am a string now separated with a plus.
Now let's say we have tensor string one and tensor string two.
So let's just copy this and repeat that and say I am I am um let's say not a string.
So that's two.
Here we have one and then we have two.
And then here we put this um in this list.
So we have tensor string one and tensor tensor string two.
There we go.
So run that and you see how we have this I am concatenated with I am.
So you have I am concatenated with I am.
And then we have a concatenated with not a a plus not a.
And then we have string concatenated with string still the same output shape.
We have many other methods.
Um, you have the length obviously that gives you the length of the string.
You have a string byte, split format and so on and so forth.
So you could feel free to check, um, all this out nonetheless.
Um, in this course, uh, wherever we'll need to use any of, of these methods, we shall explain them
so that you understand exactly what we're doing.
You could see here, for example, that this F string can convert your input, which initially was an
int um, into a string type.
So feel free to check out our other methods.
We're going to move on now to TensorFlow variables.