179 questions
No questions match those filters.
How would you design a machine learning system that aut...
This is one of the questions in the full AI/ML interview bank. Pro unlocks all 1789 questions; Premium includes the same bank plus the highest daily Practice limit.
See plansTreat image captioning as bridging two modalities rather than as a single model: an image encoder for vision, a text decoder for language, and a training recipe that teaches them to communicate through a shared representation. The key architectural decision is whether the encoder emits one vector or a sequence — a sequence is strictly more expressive because it preserves spatial information the decoder can attend to selectively, which matters a lot once you move past one-line captions.
Choosing Transformer over CNN for the encoder is really a bet on which inductive bias you need. CNNs are excellent at local texture and edge detection but lose long-range spatial relationships as depth increases unless you stack many layers. A patch-based Transformer treats the whole image as a sequence from the first layer, so self-attention can directly relate a person in one corner of the frame to an object in another — exactly the kind of relational understanding a good caption requires.
For training, leaning on pretrained components is not just an optimization, it changes what’s feasible: pretraining a language model from scratch alongside a vision model on caption data alone would starve the decoder of the broad grammatical competence it needs, so reusing an existing decoder checkpoint and finetuning end-to-end on the much smaller image-caption dataset gets you both fluency and visual grounding without the compute cost of training either from zero.