25#include "neml2/tensors/user_tensors/OnesFixedDimTensor.h"
29#define ONESFIXEDDIMTENSOR_REGISTER(T) register_NEML2_object_alias(Ones##T, "Ones" #T)
30FOR_ALL_FIXEDDIMTENSOR(ONESFIXEDDIMTENSOR_REGISTER);
41 options.
doc() =
"Construct a " +
tensor_type +
" with given batch shape filled with ones.";
44 options.
set(
"batch_shape").doc() =
"Batch shape";
56#define ONESFIXEDDIMTENSOR_INSTANTIATE_FIXEDDIMTENSOR(T) template class OnesFixedDimTensor<T>
57FOR_ALL_FIXEDDIMTENSOR(ONESFIXEDDIMTENSOR_INSTANTIATE_FIXEDDIMTENSOR);
The wrapper (decorator) for cross-referencing unresolved values at parse time.
Definition CrossRef.h:52
OnesFixedDimTensor(const OptionSet &options)
Construct a new OnesFixedDimTensor object.
Definition OnesFixedDimTensor.cxx:50
static OptionSet expected_options()
Definition OnesFixedDimTensor.cxx:34
A custom map-like data structure. The keys are strings, and the values can be nonhomogeneously typed.
Definition OptionSet.h:59
const std::string & doc() const
A readonly reference to the option set's docstring.
Definition OptionSet.h:91
T & set(const std::string &)
Definition OptionSet.h:436
Definition UserTensor.h:33
static OptionSet expected_options()
Definition UserTensor.cxx:30
std::string demangle(const char *name)
Definition parser_utils.cxx:46
Definition CrossRef.cxx:32
const torch::TensorOptions default_tensor_options()
Definition types.cxx:30
std::vector< TorchSize > TorchShape
Definition types.h:36