Record Class MBConvConfig
java.lang.Object
java.lang.Record
smile.vision.layer.MBConvConfig
- Record Components:
expandRatio- the number of output channels of the first layer in each block is input channels times expansion ratio.kernel- the window size.stride- controls the stride for the cross-correlation.inputChannels- the number of input channels.outputChannels- the number of output channels.numLayers- the number of layers.block- the block type: "FusedMBConv" or "MBConv".
-
Constructor Summary
ConstructorsConstructorDescriptionMBConvConfig(double expandRatio, int kernel, int stride, int inputChannels, int outputChannels, int numLayers, String block) Creates an instance of aMBConvConfigrecord class. -
Method Summary
Modifier and TypeMethodDescriptionblock()Returns the value of theblockrecord component.final booleanIndicates whether some other object is "equal to" this one.doubleReturns the value of theexpandRatiorecord component.static MBConvConfigFusedMBConv(double expandRatio, int kernel, int stride, int inputChannels, int outputChannels, int numLayers) Returns the config for Fused-MBConv block.final inthashCode()Returns a hash code value for this object.intReturns the value of theinputChannelsrecord component.intkernel()Returns the value of thekernelrecord component.static MBConvConfigMBConv(double expandRatio, int kernel, int stride, int inputChannels, int outputChannels, int numLayers) Returns the config for MBConv block.static MBConvConfigMBConv(double expandRatio, int kernel, int stride, int inputChannels, int outputChannels, int numLayers, double widthMultiplier, double depthMultiplier) Returns the config for MBConv block.intReturns the value of thenumLayersrecord component.intReturns the value of theoutputChannelsrecord component.intstride()Returns the value of thestriderecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
MBConvConfig
public MBConvConfig(double expandRatio, int kernel, int stride, int inputChannels, int outputChannels, int numLayers, String block) Creates an instance of aMBConvConfigrecord class.- Parameters:
expandRatio- the value for theexpandRatiorecord componentkernel- the value for thekernelrecord componentstride- the value for thestriderecord componentinputChannels- the value for theinputChannelsrecord componentoutputChannels- the value for theoutputChannelsrecord componentnumLayers- the value for thenumLayersrecord componentblock- the value for theblockrecord component
-
-
Method Details
-
MBConv
public static MBConvConfig MBConv(double expandRatio, int kernel, int stride, int inputChannels, int outputChannels, int numLayers) Returns the config for MBConv block.- Parameters:
expandRatio- the number of output channels of the first layer in each block is input channels times expansion ratio.kernel- the window size.stride- controls the stride for the cross-correlation.inputChannels- the number of input channels.outputChannels- the number of output channels.numLayers- the number of layers.- Returns:
- the config for MBConv block.
-
MBConv
public static MBConvConfig MBConv(double expandRatio, int kernel, int stride, int inputChannels, int outputChannels, int numLayers, double widthMultiplier, double depthMultiplier) Returns the config for MBConv block.- Parameters:
expandRatio- the number of output channels of the first layer in each block is input channels times expansion ratio.kernel- the window size.stride- controls the stride for the cross-correlation.inputChannels- the number of input channels.outputChannels- the number of output channels.numLayers- the number of layers.widthMultiplier- the multiplier to scale input/output channels.depthMultiplier- the multiplier to scale number of layers.- Returns:
- the config for MBConv block.
-
FusedMBConv
public static MBConvConfig FusedMBConv(double expandRatio, int kernel, int stride, int inputChannels, int outputChannels, int numLayers) Returns the config for Fused-MBConv block.- Parameters:
expandRatio- the number of output channels of the first layer in each block is input channels times expansion ratio.kernel- the window size.stride- controls the stride for the cross-correlation.inputChannels- the number of input channels.outputChannels- the number of output channels.numLayers- the number of layers.- Returns:
- the config for Fused-MBConv block.
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
expandRatio
public double expandRatio()Returns the value of theexpandRatiorecord component.- Returns:
- the value of the
expandRatiorecord component
-
kernel
-
stride
-
inputChannels
public int inputChannels()Returns the value of theinputChannelsrecord component.- Returns:
- the value of the
inputChannelsrecord component
-
outputChannels
public int outputChannels()Returns the value of theoutputChannelsrecord component.- Returns:
- the value of the
outputChannelsrecord component
-
numLayers
-
block
-