I am getting the following error when i would like to migrate from TFF 0.12.0 to TFF 0.18.0, Knowing that I have an image dataset, Here is my sample_batch
images, labels = next(img_gen.flow_from_directory(path0,target_size=(224, 224), batch_size=2))
sample_batch = (images,labels)
...
def model_fn():
keras_model = create_keras_model()
return tff.learning.from_keras_model(
keras_model,
input_spec=sample_batch,
loss=tf.keras.losses.SparseCategoricalCrossentropy(),
metrics=[tf.keras.metrics.SparseCategoricalAccuracy()])
So how can I modifiy my sample_batch to be correct with this version ? please Help !! thanks