main function

void main()

Implementation

void main() {
  // Example 3-channel input (like an RGB image with 5x5 pixels)
  List<Matrix2d> input = [
    Matrix2d(5, 5), // Red channel
    Matrix2d(5, 5), // Green channel
    Matrix2d(5, 5), // Blue channel
  ];

  // Conv layer: 3 input channels, 2 output channels, 3x3 kernel, stride 1, padding 1
  Conv2d convLayer = Conv2d(
      inChannels: 3, outChannels: 2, kernelSize: 3, stride: 1, padding: 1);

  // Forward pass
  List<Matrix2d> output = convLayer.forward(input);

  // Print output dimensions
  print("Output Feature Map Sizes: ${output[0].rows()}x${output[0].cols()}");
}