• Hidden States: The GRU maintains hidden states that capture information about the sequence of words generated so far. This allows the model to produce coherent and contextually appropriate captions. • Output Layer: The output of the GRU is passed through a softmax layer to produce a probability distribution over the vocabulary for the next word in the caption. The word with the highest probability is selected as the next word, and the process continues until a predefined end-of-sequence token is generated.