25#include "neml2/tensors/user_tensors/FullFixedDimTensor.h"
29#define FULLFIXEDDIMTENSOR_REGISTER(T) register_NEML2_object_alias(Full##T, "Full" #T)
30FOR_ALL_FIXEDDIMTENSOR(FULLFIXEDDIMTENSOR_REGISTER);
42 "Construct a full " +
tensor_type +
" with given batch shape filled with a given value.";
45 options.
set(
"batch_shape").doc() =
"Batch shape";
48 options.
set(
"value").doc() =
"Value used to fill the tensor";
55 : T(T::full(options.get<
TorchShape>(
"batch_shape"),
56 options.get<
Real>(
"value"),
62#define FULLFIXEDDIMTENSOR_INSTANTIATE_FIXEDDIMTENSOR(T) template class FullFixedDimTensor<T>
63FOR_ALL_FIXEDDIMTENSOR(FULLFIXEDDIMTENSOR_INSTANTIATE_FIXEDDIMTENSOR);
The wrapper (decorator) for cross-referencing unresolved values at parse time.
Definition CrossRef.h:52
FullFixedDimTensor(const OptionSet &options)
Construct a new FullFixedDimTensor object.
Definition FullFixedDimTensor.cxx:54
static OptionSet expected_options()
Definition FullFixedDimTensor.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