NEML2 1.4.0
|
The interface for working with tensor values (parameters, buffers, etc.) managed by models.
Public Member Functions | |
None | requires_grad_ (self, bool req=True) |
None | set_ (self, tensors.Tensor arg0) |
tensors.Tensor | tensor (self) |
torch.Tensor | torch (self) |
torch.Tensor | grad (self) |
bool | requires_grad (self) |
torch.Tensor grad | ( | self | ) |
Retrieve the accumulated vector-Jacobian product after a backward propagation.
bool requires_grad | ( | self | ) |
Value of the boolean requires_grad property of the underlying tensor.
None requires_grad_ | ( | self, | |
bool | req = True ) |
Set the requires_grad property of the underlying tensor.
None set_ | ( | self, | |
tensors.Tensor | arg0 ) |
Modify the underlying tensor data.
tensors.Tensor tensor | ( | self | ) |
Convert this to a tensors.Tensor. This conversion takes ownership of the tensor, and so any modification to the returned tensors.Tensor does not affect the original tensors.TensorValue. Use tensors.TensorValue.set_ instead to modify the tensor value.
torch.Tensor torch | ( | self | ) |
Convert this to a torch.Tensor. This conversion takes ownership of the tensor, and so any modification to the returned torch.Tensor does not affect the original tensors.TensorValue. Use tensors.TensorValue.set_ instead to modify the tensor value.