lamppp
Loading...
Searching...
No Matches
Public Member Functions | Friends | List of all members
lmp::autograd::Variable Class Reference

Public Member Functions

 Variable (const tensor::Tensor &data, bool requires_grad=false)
 
const tensor::Tensorgrad () const noexcept
 
const tensor::Tensordata () const noexcept
 
const std::shared_ptr< Function > & grad_fn () const noexcept
 
bool requires_grad () const noexcept
 
void zero_grad ()
 
void incr_grad (const tensor::Tensor &other_grad)
 
void set_grad_fn (std::shared_ptr< Function > grad_fn)
 
void copy (const Variable &other)
 
void fill (tensor::Scalar item)
 
void backward ()
 

Friends

std::ostream & operator<< (std::ostream &os, const Variable &obj)
 

The documentation for this class was generated from the following files: