25#include "neml2/tensors/user_tensors/ZerosFixedDimTensor.h"
29#define ZEROSFIXEDDIMTENSOR_REGISTER(T) register_NEML2_object_alias(Zeros##T, "Zeros" #T)
30FOR_ALL_FIXEDDIMTENSOR(ZEROSFIXEDDIMTENSOR_REGISTER);
41 options.
doc() =
"Construct a " +
tensor_type +
" with given batch shape filled with zeros.";
44 options.
set(
"batch_shape").doc() =
"Batch shape";
56#define ZEROSFIXEDDIMTENSOR_INSTANTIATE_FIXEDDIMTENSOR(T) template class ZerosFixedDimTensor<T>
57FOR_ALL_FIXEDDIMTENSOR(ZEROSFIXEDDIMTENSOR_INSTANTIATE_FIXEDDIMTENSOR);
The wrapper (decorator) for cross-referencing unresolved values at parse time.
Definition CrossRef.h:52
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
static OptionSet expected_options()
Definition ZerosFixedDimTensor.cxx:34
ZerosFixedDimTensor(const OptionSet &options)
Construct a new ZerosFixedDimTensor object.
Definition ZerosFixedDimTensor.cxx:50
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