Table of Contents

Class MobileNetV2Configuration

Namespace
AiDotNet.Configuration
Assembly
AiDotNet.dll

Configuration options for MobileNetV2 neural network architectures.

public class MobileNetV2Configuration
Inheritance
MobileNetV2Configuration
Inherited Members

Remarks

MobileNetV2 is designed for efficient mobile and edge deployment, using inverted residuals and linear bottlenecks to achieve high accuracy with low computational cost.

For Beginners: MobileNetV2 is optimized for mobile devices. The width multiplier lets you trade accuracy for speed - smaller values give faster but less accurate models.

Constructors

MobileNetV2Configuration(MobileNetV2WidthMultiplier, int, int, int, int)

Initializes a new instance of the MobileNetV2Configuration class.

public MobileNetV2Configuration(MobileNetV2WidthMultiplier widthMultiplier, int numClasses, int inputHeight = 224, int inputWidth = 224, int inputChannels = 3)

Parameters

widthMultiplier MobileNetV2WidthMultiplier

The width multiplier.

numClasses int

The number of output classes for classification.

inputHeight int

The height of input images (default: 224).

inputWidth int

The width of input images (default: 224).

inputChannels int

The number of input channels (default: 3 for RGB).

Properties

Alpha

Gets the alpha value (width multiplier as a double).

public double Alpha { get; }

Property Value

double

InputChannels

Gets the number of input channels.

public int InputChannels { get; }

Property Value

int

InputHeight

Gets the height of input images in pixels.

public int InputHeight { get; }

Property Value

int

InputShape

Gets the computed input shape as [channels, height, width].

public int[] InputShape { get; }

Property Value

int[]

InputWidth

Gets the width of input images in pixels.

public int InputWidth { get; }

Property Value

int

NumClasses

Gets the number of output classes for classification.

public int NumClasses { get; }

Property Value

int

WidthMultiplier

Gets the width multiplier for the network.

public MobileNetV2WidthMultiplier WidthMultiplier { get; }

Property Value

MobileNetV2WidthMultiplier

Methods

CreateStandard(int)

Creates a MobileNetV2 configuration with standard width (recommended default).

public static MobileNetV2Configuration CreateStandard(int numClasses)

Parameters

numClasses int

Returns

MobileNetV2Configuration