Package smile.vision
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 smile.deep.layer.LayerBlock
device, dtype, module
-
Constructor Summary
ConstructorDescriptionEfficientNet
(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 VisionModel
V2L()
EfficientNet-V2_L (largest) model.static VisionModel
EfficientNet-V2_L (largest) model.static VisionModel
V2M()
EfficientNet-V2_M (larger) model.static VisionModel
EfficientNet-V2_M (larger) model.static VisionModel
V2S()
EfficientNet-V2_S (baseline) model.static VisionModel
EfficientNet-V2_S (baseline) model.Methods inherited from class smile.deep.layer.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
Description copied from interface:Layer
Forward propagation (or forward pass) through the layer.- Parameters:
input
- the input tensor.- Returns:
- the output tensor.
-
features
Returns the feature layer block.- Returns:
- the feature layer block.
-
V2S
EfficientNet-V2_S (baseline) model.- Returns:
- the model.
-
V2S
EfficientNet-V2_S (baseline) model.- Parameters:
path
- the pre-trained model file path.- Returns:
- the model.
-
V2M
EfficientNet-V2_M (larger) model.- Returns:
- the model.
-
V2M
EfficientNet-V2_M (larger) model.- Parameters:
path
- the pre-trained model file path.- Returns:
- the model.
-
V2L
EfficientNet-V2_L (largest) model.- Returns:
- the model.
-
V2L
EfficientNet-V2_L (largest) model.- Parameters:
path
- the pre-trained model file path.- Returns:
- the model.
-