Which of the following statements about the 'attention' mechanism in neural networks is correct?
Answer
It computes a weighted sum of values based on query-key compatibility.
Explanation
Attention calculates weights by comparing queries and keys, then uses these weights to combine values, allowing dynamic focus on relevant parts.
Last reviewed: October 2026
Reviewed by FirstInTest Editorial Team
Related questions
Which of the following is a common technique for handling missing data in deep learning inputs?
View question →
In a convolutional neural network, what is the effect of using 'same' padding with a stride of 1?
View question →
In a GAN, what is the primary goal of the generator?
View question →
In the context of deep learning, what is 'curriculum learning'?
View question →
Which of the following best describes the purpose of the 'discriminator' in a GAN?
View question →
In a deep neural network, what is the effect of using a very small learning rate?
View question →