Class EfficientNet
java.lang.Object
smile.deep.layer.LayerBlock
smile.vision.EfficientNet
EfficientNet is an image classification model family. It was first
described in EfficientNet: Rethinking Model Scaling for Convolutional
Neural Networks.
-
Field Summary
Fields inherited from class LayerBlock
device, dtype, module -
Constructor Summary
ConstructorsConstructorDescriptionEfficientNet(MBConvConfig[] invertedResidualSetting, double dropout, double stochasticDepthProb, int numClasses, int lastChannel, IntFunction<Layer> normLayer) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionfeatures()Returns the feature layer block.Forward propagation (or forward pass) through the layer.static VisionModelV2L()EfficientNet-V2_L (largest) model.static VisionModelEfficientNet-V2_L (largest) model.static VisionModelV2M()EfficientNet-V2_M (larger) model.static VisionModelEfficientNet-V2_M (larger) model.static VisionModelV2S()EfficientNet-V2_S (baseline) model.static VisionModelEfficientNet-V2_S (baseline) model.Methods inherited from class LayerBlock
add, add, asTorch, device, dtype, eval, isTraining, load, save, to, to, toString, train
-
Constructor Details
-
EfficientNet
public EfficientNet(MBConvConfig[] invertedResidualSetting, double dropout, double stochasticDepthProb, int numClasses, int lastChannel, IntFunction<Layer> normLayer) Constructor.- Parameters:
invertedResidualSetting- the network structure.dropout- the dropout probability.stochasticDepthProb- the stochastic depth probability.numClasses- the number of classes.lastChannel- the number of channels on the penultimate layer.normLayer- the functor to create the normalization layer.
-
-
Method Details
-
forward
-
features
Returns the feature layer block.- Returns:
- the feature layer block.
-
V2S
-
V2S
EfficientNet-V2_S (baseline) model.- Parameters:
path- the pre-trained model file path.- Returns:
- the model.
-
V2M
-
V2M
EfficientNet-V2_M (larger) model.- Parameters:
path- the pre-trained model file path.- Returns:
- the model.
-
V2L
-
V2L
EfficientNet-V2_L (largest) model.- Parameters:
path- the pre-trained model file path.- Returns:
- the model.
-