converting our train dataset to tf.data.Dataset
tf_train_dataset = food["train"].to_tf_dataset(
     columns="pixel_values", label_cols="label", shuffle=True, batch_size=batch_size, collate_fn=data_collator
 )
converting our test dataset to tf.data.Dataset
tf_eval_dataset = food["test"].to_tf_dataset(
     columns="pixel_values", label_cols="label", shuffle=True, batch_size=batch_size, collate_fn=data_collator
 )

Configure the model for training with compile():