Я получаю следующую ошибку, когда хочу перейти с TFF 0.12.0 на TFF 0.18.0, зная, что у меня есть набор данных изображения, вот мой 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()])
Итак, как я могу изменить свой sample_batch, чтобы он соответствовал этой версии? пожалуйста помоги !! Благодарность