torchtext library <https://pytorch.org/text/stable/> __ has utilities for ... mask.float().masked_fill(mask == 0, float('-inf')).masked_fill(mask == 1, ...
確定! 回上一頁