TorchLean API

NN.API.Models.Cnn

CNN Model Helpers (API) #

Small config-style CNN constructors for runnable examples.

Configuration for a compact convolutional image classifier.

Instances For

    Height after the convolution stage.

    Instances For

      Width after the convolution stage.

      Instances For

        Height after the pooling stage.

        Instances For

          Width after the pooling stage.

          Instances For

            Flattened feature size entering the classifier head.

            Instances For
              @[reducible, inline]

              Batched image input shape for cnn.

              Instances For
                @[reducible, inline]

                Batched logits output shape for cnn.

                Instances For
                  def NN.API.nn.models.cnn (cfg : CnnConfig) (h_inC : cfg.inC 0 := by decide) (h_kH : cfg.conv.kH 0 := by decide) (h_kW : cfg.conv.kW 0 := by decide) (h_poolKH : cfg.pool.kH 0 := by decide) (h_poolKW : cfg.pool.kW 0 := by decide) :

                  Build a compact CNN classifier: conv -> relu -> maxPool -> flatten -> linear.

                  Instances For