TorchLean API

NN.MLTheory.CROWN.Operators.Conv

Convolution Bounds #

CROWN-IBP bounds and an exact flattened affine map for arbitrary-dimensional convolution.

Design notes:

Flatten a Box to a rank-one box by flattening both endpoints.

Instances For

    Decode a row-major flat index into one coordinate per dimension.

    Instances For
      def NN.MLTheory.CROWN.ibpConv {α : Type} [TorchLean.Storage α] [Context α] {d inC outC : } {kernel stride padding inSpatial : TorchLean.Tensor [d]} (layer : Spec.ConvSpec d inC outC kernel stride padding α) (xB : Box α (Spec.Shape.ofList (inC :: inSpatial.to (List )))) :
      Box α (Spec.Shape.ofList (outC :: (Spec.convOutSpatial inSpatial kernel stride padding).to (List )))

      Interval propagation for an arbitrary-dimensional convolution.

      Instances For
        def NN.MLTheory.CROWN.convLinearMatrix {α : Type} [TorchLean.Storage α] [Context α] {d inC outC : } {kernel stride padding inSpatial : TorchLean.Tensor [d]} (layer : Spec.ConvSpec d inC outC kernel stride padding α) :
        have inShape := Spec.Shape.ofList (inC :: inSpatial.to (List )); have outShape := Spec.Shape.ofList (outC :: (Spec.convOutSpatial inSpatial kernel stride padding).to (List )); TorchLean.Tensor α [outShape.size, inShape.size]

        Explicit flattened linear operator for an arbitrary-dimensional convolution.

        Instances For
          def NN.MLTheory.CROWN.convBiasBroadcast {α : Type} [TorchLean.Storage α] [Context α] {d outC : } {outSpatial : TorchLean.Tensor [d]} (bias : TorchLean.Tensor α [outC]) :
          have outShape := Spec.Shape.ofList (outC :: outSpatial.to (List )); TorchLean.Tensor α [outShape.size]

          Flattened broadcast of a convolution bias over every output spatial position.

          Instances For