NEML2 1.4.0
|
Concrete definition of tensor value. More...
Concrete definition of tensor value.
#include <TensorValue.h>
Public Member Functions | |
TensorValue ()=default | |
TensorValue (const T &value) | |
virtual void | to (const torch::TensorOptions &options) override |
Send the value to the target options. | |
virtual | operator BatchTensor () const override |
Convert the parameter value to a BatchTensor. | |
template<typename T2 = T, typename = typename std::enable_if_t<!std::is_same_v<T2, BatchTensor>>> | |
operator T () const | |
T & | value () |
virtual void | set (const BatchTensor &val) override |
Set the parameter value. | |
Public Member Functions inherited from TensorValueBase | |
virtual | ~TensorValueBase ()=default |
|
default |
|
inline |
|
inlineoverridevirtual |
Convert the parameter value to a BatchTensor.
Implements TensorValueBase.
|
inlineoverridevirtual |
Set the parameter value.
Implements TensorValueBase.
Send the value to the target options.
Implements TensorValueBase.
|
inline |