Skip to content
Advertisement

Tag: bilstm

What does Tensor[batch_mask, …] do?

I saw this line of code in an implementation of BiLSTM: I assume this is some kind of “masking” operation, but found little information on Google about the meaning of …. Please help:). Original Code: Answer I assume that batch_mask is a boolean tensor. In that case, batch_output[batch_mask] performs a boolean indexing that selects the elements corresponding to True in

Advertisement