Documentation

Hesper.NN.Conv

Convolutional Neural Network Operations #

GPU kernels for convolution and pooling operations using ShaderM monad. Supports 2D convolution, depthwise convolution, and pooling layers.

Configuration for 2D convolution

  • batch : Nat

    Input dimensions: [batch, height, width, channels]

  • inputHeight : Nat
  • inputWidth : Nat
  • inputChannels : Nat
  • kernelHeight : Nat

    Kernel dimensions

  • kernelWidth : Nat
  • outputChannels : Nat

    Output channels

  • stride : Nat

    Stride

  • padding : Nat

    Padding

  • workgroupSize : Nat

    Workgroup size

Instances For
    Equations
    • One or more equations did not get rendered due to their size.
    Instances For
      Equations
      • One or more equations did not get rendered due to their size.
      Instances For

        Output height after convolution

        Equations
        Instances For

          Output width after convolution

          Equations
          Instances For

            Configuration for pooling operations

            • batch : Nat

              Input dimensions: [batch, height, width, channels]

            • inputHeight : Nat
            • inputWidth : Nat
            • channels : Nat
            • poolHeight : Nat

              Pool dimensions

            • poolWidth : Nat
            • stride : Nat

              Stride

            • workgroupSize : Nat

              Workgroup size

            Instances For
              Equations
              • One or more equations did not get rendered due to their size.
              Instances For
                Equations
                • One or more equations did not get rendered due to their size.
                Instances For

                  Output height after pooling

                  Equations
                  Instances For

                    Output width after pooling

                    Equations
                    Instances For

                      Max pooling kernel using ShaderM monad

                      Equations
                      • One or more equations did not get rendered due to their size.
                      Instances For

                        Average pooling kernel using ShaderM monad

                        Equations
                        • One or more equations did not get rendered due to their size.
                        Instances For

                          2D convolution kernel using ShaderM monad (NHWC format)

                          Equations
                          • One or more equations did not get rendered due to their size.
                          Instances For

                            Depthwise convolution kernel using ShaderM monad (for MobileNets)

                            Equations
                            • One or more equations did not get rendered due to their size.
                            Instances For

                              Generate WGSL shader for 2D convolution

                              Equations
                              Instances For

                                Generate WGSL shader for depthwise convolution

                                Equations
                                • One or more equations did not get rendered due to their size.
                                Instances For

                                  Generate WGSL shader for max pooling

                                  Equations
                                  • One or more equations did not get rendered due to their size.
                                  Instances For

                                    Generate WGSL shader for average pooling

                                    Equations
                                    • One or more equations did not get rendered due to their size.
                                    Instances For