A single-batched, logically 2D LabeledTensor.
|
void | accumulate (const LabeledMatrix &other, bool recursive=true) |
|
void | fill (const LabeledMatrix &other, bool recursive=true) |
|
LabeledMatrix | chain (const LabeledMatrix &other) const |
| Chain rule product of two derivatives.
|
|
LabeledMatrix | inverse () const |
| Invert a LabeledMatrix for use in an implicit function derivative.
|
|
| LabeledTensor ()=default |
| Default constructor.
|
|
| LabeledTensor (const torch::Tensor &tensor, TorchSize batch_dim, const std::vector< const LabeledAxis * > &axes) |
| Construct from a Tensor with batch dim and vector of LabeledAxis
|
|
| LabeledTensor (const BatchTensor &tensor, const std::vector< const LabeledAxis * > &axes) |
| Construct from a BatchTensor with vector of LabeledAxis
|
|
| LabeledTensor (const LabeledMatrix &other) |
| Copy constructor.
|
|
void | operator= (const LabeledMatrix &other) |
| Assignment operator.
|
|
| operator BatchTensor () const |
| A potentially dangerous implicit conversion.
|
|
| operator torch::Tensor () const |
| A potentially dangerous implicit conversion.
|
|
LabeledMatrix | clone (torch::MemoryFormat memory_format=torch::MemoryFormat::Contiguous) const |
| Clone this LabeledTensor.
|
|
void | copy_ (const T &other) |
| Copy the value from another tensor.
|
|
LabeledMatrix | detach () const |
| Return a copy without gradient graphs.
|
|
void | detach_ () |
| Detach from gradient graphs.
|
|
void | zero_ () |
| Zero out this tensor.
|
|
torch::TensorOptions | options () const |
| Get the tensor options.
|
|
TorchSize | batch_dim () const |
| Return the number of batch dimensions.
|
|
TorchSize | base_dim () const |
| Return the number of base dimensions.
|
|
TorchShapeRef | batch_sizes () const |
| Return the batch size.
|
|
TorchShapeRef | base_sizes () const |
| Return the base size.
|
|
const std::vector< const LabeledAxis * > & | axes () const |
| Get all the labeled axes.
|
|
const LabeledAxis & | axis (TorchSize i=0) const |
| Get a specific labeled axis.
|
|
TorchSlice | slice_indices (S &&... names) const |
| How to slice the tensor given the names on each axis.
|
|
TorchShapeRef | storage_size () const |
| The shape of the entire LabeledTensor.
|
|
TorchShape | storage_size (S &&... names) const |
| The shape of a sub-block specified by the names on each dimension.
|
|
BatchTensor | operator() (S &&... names) const |
|
LabeledMatrix | slice (TorchSize i, const std::string &name) const |
| Slice the tensor on the given dimension by a single variable or sub-axis.
|
|
LabeledMatrix | block (S &&... names) const |
| Get the sub-block labeled by the given sub-axis names.
|
|
LabeledMatrix | batch_index (TorchSlice indices) const |
| Get a batch.
|
|
void | batch_index_put (TorchSlice indices, const torch::Tensor &other) |
| Set a index sliced on the batch dimensions to a value.
|
|
BatchTensor | base_index (TorchSlice indices) const |
| Return an index sliced on the batch dimensions.
|
|
void | base_index_put (TorchSlice indices, const torch::Tensor &other) |
| Set a index sliced on the batch dimensions to a value.
|
|
variable_type< T >::type | get (S &&... names) const |
| Get and interpret the view as an object.
|
|
variable_type< T >::type | get_list (S &&... names) const |
| Get and interpret the view as a list of objects.
|
|
void | set (const BatchTensorBase< T > &value, S &&... names) |
| Set and interpret the input as an object.
|
|
void | set_list (const BatchTensorBase< T > &value, S &&... names) |
| Set and interpret the input as a list of objects.
|
|
LabeledMatrix | operator- () const |
| Negation.
|
|
LabeledMatrix | to (const torch::TensorOptions &options) const |
| Change tensor options.
|
|
const BatchTensor & | tensor () const |
|
BatchTensor & | tensor () |
|