The bidirectional text-image retrieval framework consists of a text encoder and an image encoder. The text encoder is composed of word embeddings, a GRU [1]} or LSTM [2]} layer and a temporal pooling layer. The image encoder is a VGG19 [3]} or ResNet152 [4]} pre-trained on ImageNet [5]} and a linear layer. We denote them as functions \(f\)  and \(g\)  which map text and image to two vectors of size \(d\)  respectively.
