How can I convert a Ragged Tensor to a Non Ragged Tensor if The Ragged Tensor isn't actually ragged

So I get a ragged tensor through an entire process and it’s something like -
<tf.RaggedTensor [[1, 2, 3,4]]> now I know for sure it will always be of this form just the number of entries in the inner list might be more or less. I wish to convert this to a simple tf.Tensor. Is there a function which does this currently? If not what would be the most optimal way to do this given I’ll be needing to do this multiple times and and that I can’t change the incoming ragged tensor beforehand

How about using to_tensor() method?


Thanks I didn’t notice this method already exists!