Return a copy of input with positions index along dim set to value.
Autograd flows through the unmasked positions; filled positions receive zero gradient (they're overwritten by a constant).
Parameters
Returns
TensorSame shape and dtype as input; indexed slices replaced by
value, others unchanged.