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
widthMultiplierMobileNetV2WidthMultiplierThe width multiplier.
numClassesintThe number of output classes for classification.
inputHeightintThe height of input images (default: 224).
inputWidthintThe width of input images (default: 224).
inputChannelsintThe 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
InputChannels
Gets the number of input channels.
public int InputChannels { get; }
Property Value
InputHeight
Gets the height of input images in pixels.
public int InputHeight { get; }
Property Value
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
NumClasses
Gets the number of output classes for classification.
public int NumClasses { get; }
Property Value
WidthMultiplier
Gets the width multiplier for the network.
public MobileNetV2WidthMultiplier WidthMultiplier { get; }
Property Value
Methods
CreateStandard(int)
Creates a MobileNetV2 configuration with standard width (recommended default).
public static MobileNetV2Configuration CreateStandard(int numClasses)
Parameters
numClassesint