25#include "neml2/tensors/LabeledVector.h"
26#include "neml2/tensors/LabeledMatrix.h"
47 const auto indices = axis(0).common_indices(
other.axis(0),
recursive);
57 if (a.axis(0) != b.axis(0))
60 for (
auto var : a.axis(0).variable_accessors(
true))
61 if (!torch::allclose(a(
var), b(
var), rtol, atol))
BatchTensor base_index(const TorchSlice &indices) const
Return an index sliced on the base dimensions.
Definition BatchTensorBase.cxx:193
The wrapper (decorator) for cross-referencing unresolved values at parse time.
Definition CrossRef.h:52
const LabeledAxis & axis(TorchSize i=0) const
Get a specific labeled axis.
Definition LabeledTensor.h:130
BatchTensor _tensor
The tensor.
Definition LabeledTensor.h:215
A single-batched, logically 1D LabeledTensor.
Definition LabeledVector.h:38
void accumulate(const LabeledVector &other, bool recursive=true)
Definition LabeledVector.cxx:37
LabeledVector slice(const std::string &name) const
Slice the logically 1D tensor by a single sub-axis.
Definition LabeledVector.cxx:31
bool allclose(const LabeledVector &a, const LabeledVector &b, Real rtol, Real atol)
Definition LabeledVector.cxx:55
Definition CrossRef.cxx:32
double Real
Definition types.h:33