torch.Tensor.masked_fill_¶
- Tensor.masked_fill_(mask, value)¶
- Fills elements of - selftensor with- valuewhere- maskis True. The shape of- maskmust be broadcastable with the shape of the underlying tensor.- Parameters
- mask (BoolTensor) – the boolean mask 
- value (float) – the value to fill in with