26#include "neml2/tensors/Tensor.h"
71 : _value(std::
move(value))
75 void to_(
const torch::TensorOptions & options)
override;
77 operator Tensor()
const override;
The wrapper (decorator) for cross-referencing unresolved values at parse time.
Definition CrossRef.h:54
The base class to allow us to set up a polymorphic container of Tensors. The concrete definitions wil...
Definition TensorValue.h:39
TensorValueBase(const TensorValueBase &)=default
TensorValueBase()=default
TensorValueBase(TensorValueBase &&) noexcept=default
TensorValueBase & operator=(const TensorValueBase &)=default
virtual TensorType type() const =0
Tensor type.
virtual void requires_grad_(bool req=true)=0
Require grad.
virtual void to_(const torch::TensorOptions &)=0
Send the value to the target options.
Concrete definition of tensor value.
Definition TensorValue.h:68
T & value()
Definition TensorValue.h:80
TensorValue(T value)
Definition TensorValue.h:70
Definition CrossRef.cxx:31
TensorType
Definition tensors.h:61