Class MobileNetV3Configuration
- Namespace
- AiDotNet.Configuration
- Assembly
- AiDotNet.dll
Configuration options for MobileNetV3 neural network architectures.
public class MobileNetV3Configuration
- Inheritance
-
MobileNetV3Configuration
- Inherited Members
Remarks
MobileNetV3 builds on MobileNetV2 with additional optimizations including squeeze-and-excitation blocks and hard-swish activation for improved accuracy.
For Beginners: MobileNetV3 comes in Large (more accurate) and Small (faster) variants. Choose based on whether you prioritize accuracy or speed.
Constructors
MobileNetV3Configuration(MobileNetV3Variant, int, MobileNetV3WidthMultiplier, int, int, int)
Initializes a new instance of the MobileNetV3Configuration class.
public MobileNetV3Configuration(MobileNetV3Variant variant, int numClasses, MobileNetV3WidthMultiplier widthMultiplier = MobileNetV3WidthMultiplier.Alpha100, int inputHeight = 224, int inputWidth = 224, int inputChannels = 3)
Parameters
variantMobileNetV3VariantThe MobileNetV3 variant (Large or Small).
numClassesintThe number of output classes for classification.
widthMultiplierMobileNetV3WidthMultiplierThe width multiplier (default: Alpha100).
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
Variant
Gets the MobileNetV3 variant to use.
public MobileNetV3Variant Variant { get; }
Property Value
WidthMultiplier
Gets the width multiplier for the network.
public MobileNetV3WidthMultiplier WidthMultiplier { get; }
Property Value
Methods
CreateLarge(int)
Creates a MobileNetV3-Large configuration (recommended default).
public static MobileNetV3Configuration CreateLarge(int numClasses)
Parameters
numClassesint
Returns
CreateSmall(int)
Creates a MobileNetV3-Small configuration for low-latency applications.
public static MobileNetV3Configuration CreateSmall(int numClasses)
Parameters
numClassesint