TorchLean API

NN.MLTheory.CROWN.Operators.Slice

Slice / gather / split operator bounds #

This file provides IBP and affine transfer rules for a small subset of indexing-like operations:

Important limitation: this does not model tensor-valued index dtypes inside the differentiable graph (i.e. no PyTorch-style LongTensor indexing/gather/scatter driven by data tensors).

View a vector tensor through its leading-axis slices.

Instances For

    IBP for Slice: extract elements [start, stop) from a flattened vector. Slice is a linear operation, so bounds propagate exactly.

    Instances For

      IBP for Gather: index into a vector using integer indices.

      For input $x$ and a concrete index vector, the output satisfies $y_j=x_{\mathrm{indices}[j]}$. This is a permutation or selection.

      Instances For

        IBP for Split: split a rank-one tensor into multiple parts. Returns an array of FlatBox values, one for each split.

        Instances For
          def NN.MLTheory.CROWN.Operators.Slice.affSlice? {α : Type} [TorchLean.Storage α] [Context α] {inDim outDim : } (start sliceSize : ) (aff : AffineVec α inDim outDim) :
          Option (AffineVec α inDim sliceSize)

          Affine bounds for Slice: extract a subvector of an affine form.

          If the input represents $y=Ax+c$, slicing selects the corresponding rows of $A$ and entries of $c$.

          Instances For
            def NN.MLTheory.CROWN.Operators.Slice.affGather? {α : Type} [TorchLean.Storage α] [Context α] {inDim outDim : } (indices : Array ) (aff : AffineVec α inDim outDim) :
            Option (AffineVec α inDim indices.size)

            Affine bounds for Gather: permute/select rows of affine form.

            Instances For

              Derivative bounds for Slice: derivatives just slice through.

              Instances For

                Derivative bounds for Gather: derivatives follow the same indexing.

                Instances For

                  Concatenate multiple FlatBoxes into one.

                  Instances For