embedding_to_padding: Calculates the padding mask based on which embeddings are all...

Description Usage Details

View source: R/attention-utils.R

Description

emb Tensor with shape [..., depth]

Usage

1

Details

Returns: a float Tensor with shape [...]. Each element is 1 if its corresponding embedding vector is all zero, and is 0 otherwise.


ifrit98/transformR documentation built on Nov. 26, 2019, 2:14 a.m.