TorchLean API

NN.Spec.Module.Conv

Convolution Modules #

Convolution modules are parameterized by vectors of spatial extents. The same definitions cover one-dimensional sequences, images, volumes, and higher-rank spatial data.

def Spec.Module.conv {α : Type} [TorchLean.Storage α] [Context α] {d inC outC : } {kernel stride padding inSpatial : TorchLean.Tensor [d]} (m : ConvSpec d inC outC kernel stride padding α) :
Module α (Shape.ofList (inC :: inSpatial.to (List ))) (Shape.ofList (outC :: (convOutSpatial inSpatial kernel stride padding).to (List )))

Wrap an arbitrary-rank channels-first convolution as a Spec.Module.

Instances For
    def Spec.Module.convTranspose {α : Type} [TorchLean.Storage α] [Context α] {d inC outC : } {kernel stride padding inSpatial : TorchLean.Tensor [d]} (m : ConvTransposeSpec d inC outC kernel stride padding α) :
    Module α (Shape.ofList (inC :: inSpatial.to (List ))) (Shape.ofList (outC :: (convTransposeOutSpatial inSpatial kernel stride padding).to (List )))

    Wrap an arbitrary-rank channels-first transposed convolution as a Spec.Module.

    Instances For