transpose_for_scores | R Documentation |
In Python code, this is internal to attention_layer. Pulling it out into separate function here.
transpose_for_scores( input_tensor, batch_size, num_attention_heads, seq_length, width )
input_tensor |
Tensor to reshape and transpose. |
batch_size |
Size of the first dimension of input_tensor. |
num_attention_heads |
Size of the third dimension of input_tensor. (Will be transposed to second dimension.) |
seq_length |
Size of the second dimension of input_tensor. (Will be transposed to third dimension.) |
width |
Size of fourth dimension of input_tensor. |
Tensor of shape: batch_size, num_attention_heads, seq_length, width.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.