I have a `tf.tensor`

which is something like `<tf.Tensor: shape=(3,), dtype=int32, numpy=array([1, 2, 3], dtype=int32)>`

Now I know for a fact that the tensor I’ll be getting in that task will just be variants of this tensor that is the shape will be somethin like `(x,)`

and the it will be an array of x elements.

However I need to set the static shape of this tensor to `[None]`

so that I can still batch to a ragged tensor with `tf.data.experimental.dense_to_ragged_batch`

I tried out using `t.set_shape([None])`

but I’m not sure how to check if this did actually set the shape as intended.

How can I check that? and also if this process isn’t right what other ways can I use?

How about checking the rank of the tensor using `tf.debugging.assert_equal`

like the below code?

```
x = ... # type: tf.Tensor
# ex> x: <tf.Tensor: shape=(3,), dtype=int32, numpy=array([1, 2, 3], dtype=int32)>
tf.debugging.assert_near(tf.rank(x), 1)
```

or maybe you can reshape tensors to have a `[None]`

shape.

```
x = tf.reshape(x, [-1])
```