Hi everyone,
I am trying to create a tf.data.Dataset from images that have different shapes without resizing and cropping while creating the dataset in order to keep that to be handled in the data augmentation part.
I tried to create the dataset a little similar to what the Keras example Classification with KerasCV does in its last section however, unlike the Keras example that works, my example fails when I try to ragged_batch the dataset with error “Cannot add tensor to the batch: number of elements does not match.”
I cannot figure out what the actual difference between the 2 examples since the tensors types in those examples prior to batching the datasets are the same.
Any help?
Here’s the Colab I show both dataset creation:
Thanks!
Fadi Badine