I've been trying to convert a tensor of type:

```
tensorflow.python.framework.ops.Tensor

```

to an eagertensor:

```
<class 'tensorflow.python.framework.ops.EagerTensor'>

```

I've been searching for a solution but couldn't find one. Any help would be appreciated.

**Context:**

I have obtained the tensor using the feature extraction method from a Keras Sequential model. The output was a tensor of the first mentioned type.
However, when I tried to convert it to numpy using .numpy(), it did not work with the following error:

```
'Tensor' object has no attribute 'numpy'

```

But then when I try creating a tensor using tf.constant and then using .numpy() to convert it, it works fine!

The only difference I found is that the types of tensors are different:
The tensor generated by Keras sequential is of the first type mentionned above, whereas the second tensor that I have created manually is of the second type (Eager tensor).