`Unsupported object type numpy.ndarray` on multi-input `Dataset`
@maifeeulasad,
Apologies for the delay!
Could you please provide the complete code to reproduce the issue which helps us to analyse the issue in an effective way. Thank you This issue was closed because it has been inactive for 7 days since being marked as stale. Please reopen if you'd like to work on this further. Are you satisfied with the resolution of your issue?
<a href="https://docs.google.com/forms/d/e/1FAIpQLSfaP12TRhd9xSxjXZjcZFNXPGk4kc1-qMdv3gc6bEP90vY1ew/viewform?entry.85265664=Yes&entry.2137816233=https://github.com/tensorflow/tensorflow/issues/59848">Yes</a>
<a href="https://docs.google.com/forms/d/e/1FAIpQLSfaP12TRhd9xSxjXZjcZFNXPGk4kc1-qMdv3gc6bEP90vY1ew/viewform?entry.85265664=No&entry.2137816233=https://github.com/tensorflow/tensorflow/issues/59848">No</a>

<details><summary>Click to expand!</summary> 
 
 ### Issue Type

Support

### Have you reproduced the bug with TF nightly?

No

### Source

binary

### Tensorflow Version

2.11.0

### Custom Code

Yes

### OS Platform and Distribution

Kaggle kernel

### Mobile device

_No response_

### Python version

3.7.12

### Bazel version

_No response_

### GCC/Compiler version

_No response_

### CUDA/cuDNN version

_No response_

### GPU model and memory

_No response_

### Current Behaviour?

```shell
I'm trying to return tuple to a dataset to be used in a multi-input model, but it's throwing an error saying: `Unsupported object type numpy.ndarray`. Previosuly I was setting shape, with `set_shape`, but right now I simply don't know how to set shape for a different input shape.
```


### Standalone code to reproduce the issue

```shell
def read_image(path, rel):
    # blah blah blah, read somehow
    return image

def read_image1(path1, filter0):
    # blah blah blah, read somehow
    return image

def preprocess(x, y):
    def func(x, y):
        x = json.loads(x)
        x_img1 = read_image(x['path'], x['rel']) # 3D image
        x_img2 = read_image(x['path-fork'], x['filter']) #2D image with different shape
        # image resizing will lose data
        
        y = tf.keras.utils.to_categorical(y, num_classes=len(set(df['label'].values))) # todo: yeah, i'll optimize it never
        
        return (x_img1, x_img2), y

    _x, _y = tf.numpy_function(func, [x, y], [tf.float32, tf.float32])
    # _x.set_shape([256, 256, 3]) <--- previously i used to do this
    _y.set_shape([10])
    
    return _x, _y


# here `x` is an array of string, and those strings are actually json/dictionary
def tf_dataset(x,y, batch=16):
    dataset = tf.data.Dataset.from_tensor_slices((x, y))
    dataset = dataset.shuffle(buffer_size=1000)
    dataset = dataset.map(preprocess)
    dataset = dataset.batch(batch)
    dataset = dataset.prefetch(16)
    return dataset
```


### Relevant log output

```shell
InternalError: Graph execution error:

Unsupported object type numpy.ndarray
     [[{{node PyFunc}}]]
     [[IteratorGetNext]] [Op:__inference_train_function_30745]
```

Here is what I'm trying to do:
![multi input model with tf.data.Dataset](https://user-images.githubusercontent.com/29339330/222134871-4b2d6e7b-32b4-400c-8a91-0fc14a13ae11.png)

</details>