Convert data to TFrecords? Keras model in google cloud

I am trying to train a Keras model in the google cloud (my first attempt at training in a cloud), and it seems I need to convert my data to TFrecords first? I mistakengily uploaded my data as is, thinking I can use
flow_from_directory but it seems I need to convert it to TFrecords first?

I can’t seem to convert it correctly using a built-in tensorflow script.

Ideally I don’t want to convert it to TFrecords but if I can’t avoid it, anyone know what I am doing wrong in my conversion (in the link above).