import numpy as np
import pandas as pd
import tensorflow as tf
import tensorflow_datasets as tfds
from tensorflow import keras
from tensorflow.keras.applications.resnet50 import ResNet50
from tensorflow.keras.models import Model    
(stl_train, stl_test, stl_unlabelled), ds_info = tfds.load('stl10',split=['train','test','unlabelled'],shuffle_files=True,as_supervised=True,with_info=True)
base_model = ResNet50(input_shape=ds_info.features['image'].shape,weights=None)
def reshapeImage(image, label):
  return tf.reshape(image, (1,96,96,3)), tf.convert_to_tensor(onehot_encoded[label.numpy()])
stl_train = stl_train.map(reshapeImage, num_parallel_calls=tf.data.experimental.AUTOTUNE)

The labels are tf.Tensor(4, shape=(), dtype=int64) ,I want the 4, in this example, which I will be using to convert into one-hot encoded labels, but I am unable to do so