combine_heads

opennmt.layers.combine_heads(inputs)[source]

Concatenates heads.

Parameters

inputs – A tf.Tensor of shape \([B, H, T, D]\).

Returns

A tf.Tensor of shape \([B, T, D * H]\).