Rate this Page

torch.Tensor.as_subclass#

Tensor.as_subclass(cls)Tensor#

Makes acls instance with the same data pointer asself. Changesin the output mirror changes inself, and the output stays attachedto the autograd graph.cls must be a subclass ofTensor.