Rate this Page

torch.Tensor.apply_#

Tensor.apply_(callable)Tensor#

Applies the functioncallable to each element in the tensor, replacingeach element with the value returned bycallable.

Note

This function only works with CPU tensors and should not be used in codesections that require high performance.