com.microsoft - RestorePadding#

RestorePadding - 1 (com.microsoft)#

Version

This version of the operator has been available since version 1 of domain com.microsoft.

Summary

Restore paddings and fill padding with zeros.

The input has padding with shape (total_tokens, hidden_size) and token_offset with shape (batch_size, sequence_length). The output has shape (batch_size, sequence_length, hidden_size).

Inputs

  • input (heterogeneous) - T: Input tensor with shape (total_tokens, hidden_size)

  • token_offset (heterogeneous) - M: Offset of non-padding tokens and paddings. Its shape is (batch_size, sequence_length)

Outputs

  • output (heterogeneous) - T: output tensor with shape (batch_size, sequence_length, hidden_size)

Examples