Skip to content

Conversation

pengyuchen
Copy link

In multihead-attention model, there should be one more linear projection layer at the end of the output (before residual connection).



# Linear projections
outputs = tf.layers.dense(outputs, num_units, activation=tf.nn.relu) # (N, T_q, C)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you are right about an extra projection, but can I ask about the activation function here? seems in the original paper there is no bias and activation, only a plain "Concat(head1, ..., headh)W_O"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants