In this section, we are going to describe and implement functions for loading data, training the models, and logging our experiments.
Experimental setup
Data utils
We are going to use the Oxford-102 Flowers dataset along with five text descriptions per image. In this implementation, we are going to use embedding provided by the authors in the paper Generative Adversarial Text- to-image Synthesis. You can use text embedding-model, or train a new text-embedding model by following the instructions in the author's GitHub repo: https://github.com/reedscot/icml2016.
We define a helper function to convert images from bytes:
def images_from_bytes(byte_images, img_size=(64, 64)):
# uses PIL's Image to open and resize...