Let's say i have as source data a dataset of 32*32*3 images of type:
<DatasetV1Adapter shapes: {coarse_label: (), image: (32, 32, 3), label: ()}, types: {coarse_label: tf.int64, image: tf.uint8, label: tf.int64}>
After serializing the data i get:
<MapDataset shapes: {depth: (), height: (), image_raw: (), label: (), width: ()}, types: {depth: tf.int64, height: tf.int64, image_raw: tf.string, label: tf.int64, width: tf.int64}>
I can access each element using this piece of code:
for i in parsed_image_dataset.take(1):
j=i['image_raw']
array_shape = e1['image'].numpy().shape
print(np.frombuffer(j.numpy(), dtype = 'uint8').reshape(array_shape))
where e1 has be generated using get_next in the original dataset.So as expected the print prints an identical image to the one pre-serialization.However instead of doing this element by element could i somehow transform my serialized dataset immediatly into the original uint8 one?