Rate this Page
โ˜… โ˜… โ˜… โ˜… โ˜…

torch.Tensor.masked_fill_#

Tensor.masked_fill_(mask, value)#

Fills elements of self tensor with value where mask is True. The shape of mask must be broadcastable with the shape of the underlying tensor.

Parameters
  • mask (BoolTensor) โ€“ the boolean mask

  • value (float) โ€“ the value to fill in with