26#include "neml2/tensors/Tensor.h"
59 virtual
void operator=(const
Tensor & val) = 0;
71 : _value(std::move(value))
77 operator Tensor()
const override;
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 to_(const TensorOptions &)=0
Send the value to the target options.
virtual void requires_grad_(bool req=true)=0
Require grad.
Concrete definition of tensor value.
Definition TensorValue.h:68
T & value()
Definition TensorValue.h:80
TensorValue(T value)
Definition TensorValue.h:70
Definition DiagnosticsInterface.cxx:30
TensorType
Definition tensors.h:61
c10::TensorOptions TensorOptions
Definition types.h:60