Tensor Packs #
Shape-indexed tensor packs and supervised samples.
Main declarations:
TorchLean.TensorPack: a typed tuple of tensors.TorchLean.tensorpack.*: constructors, projections, mapping, zipping, append, and split.TorchLean.Sample.*: supervised(x, y)samples and minibatch wrappers.
These operations preserve the shapes carried by the underlying tensor-pack representation.
A heterogeneous tensor tuple whose list of shapes is tracked in its type.
Instances For
Construct a one-element tensor pack.
Instances For
Construct a two-element tensor pack.
Instances For
Construct a three-element tensor pack.
Instances For
Construct a four-element tensor pack.
Instances For
Map each tensor entry (shape-preserving).
Instances For
Zip two tensor packs pointwise (shape-preserving).
Instances For
Append two tensor packs.
Instances For
Split a tensor pack into its prefix and suffix.
Instances For
First element of a non-empty tensor pack.
Instances For
Second element of a tensor pack with at least two entries.
Instances For
Third element of a tensor pack with at least three entries.
Instances For
Fourth element of a tensor pack with at least four entries.
Instances For
Unpack a one-element tensor pack.
Instances For
Unpack a two-element tensor pack into a Lean pair.
Instances For
Unpack a three-element tensor pack into a Lean triple.
Instances For
Unpack a four-element tensor pack into a Lean tuple.
Instances For
Construct a seven-element tensor pack.
Instances For
A supervised sample (x, y) with input shape σ and target shape τ.
Instances For
A fixed-size minibatch of supervised samples.
Instances For
Build a supervised sample (x, y) as a two-tensor pack.
Instances For
Build a batched supervised sample (xBatch, yBatch).
Instances For
Extract the input tensor x from a supervised sample.
Instances For
Extract the target tensor y from a supervised sample.
Instances For
Unpack a supervised sample as the ordinary pair (x, y).
Instances For
Map a function over the input tensor x, leaving the target y unchanged.
Instances For
Map a function over the target tensor y, leaving the input x unchanged.
Instances For
Map functions over both x and y in a supervised sample.
Instances For
One supervised-learning observation containing an input tensor and its target tensor.