What is the attention mechanism in transformer-based neural networks?
-
A
A regularization technique that focuses training on hard examples
-
B
A method to weight the relevance of different input positions when producing each output
-
C
A pruning strategy that removes low-activation neurons
-
D
A gating mechanism borrowed directly from LSTM cells