DenseNetConfiguration

Options & Configuration · AiDotNet.Configuration

Configuration options for DenseNet neural network architectures.

For Beginners

DenseNet is designed to maximize information flow by connecting each layer directly to all subsequent layers. This configuration lets you choose which variant to use and customize parameters like growth rate and compression factor.

How It Works

DenseNet (Densely Connected Convolutional Networks) connects each layer to every other layer in a feed-forward fashion, enabling strong gradient flow and feature reuse.

Constructors

Constructor Summary
DenseNetConfiguration(DenseNetVariant variant, int numClasses, int inputHeight, int inputWidth, int inputChannels, int growthRate, double compressionFactor, int[] customBlockLayers) Initializes a new instance of the DenseNetConfiguration class.

Properties

Property Summary
DenseNetVariant Variant { get; } Gets the DenseNet variant to use.
double CompressionFactor { get; } Gets the compression factor for transition layers.
int GrowthRate { get; } Gets the growth rate (k in the paper).
int InputChannels { get; } Gets the number of input channels.
int InputHeight { get; } Gets the height of input images in pixels.
int InputWidth { get; } Gets the width of input images in pixels.
int NumClasses { get; } Gets the number of output classes for classification.
int[] CustomBlockLayers { get; } Gets the custom block layers configuration (only used when Variant is Custom).
int[] InputShape { get; } Gets the computed input shape as [channels, height, width].

Methods

Method Summary
DenseNetConfiguration CreateDenseNet121(int numClasses) Creates a DenseNet-121 configuration (recommended default).
int GetExpectedLayerCount() Gets the expected total layer count for this configuration without constructing the network.
int[] GetBlockLayers() Gets the number of layers per dense block for this variant.