NEML2 2.0.0
Loading...
Searching...
No Matches
TensorValue Class Reference

Detailed Description

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)
 

Member Function Documentation

◆ grad()

torch.Tensor grad ( self)
Retrieve the accumulated vector-Jacobian product after a backward propagation.

◆ requires_grad()

bool requires_grad ( self)
Value of the boolean requires_grad property of the underlying tensor.

◆ requires_grad_()

None requires_grad_ ( self,
bool req = True )
Set the requires_grad property of the underlying tensor.

◆ set_()

None set_ ( self,
tensors.Tensor arg0 )
Modify the underlying tensor data.

◆ tensor()

tensors.Tensor tensor ( self)
Convert to a tensors.Tensor

◆ torch()

torch.Tensor torch ( self)
Convert to a torch.Tensor