glasses.models.utils package¶
Submodules¶
glasses.models.utils.scaler module¶
- class glasses.models.utils.scaler.CompoundScaler[source]¶
Bases:
object
Scales widths and depths. Proposed in EfficientNet: Rethinking Model Scaling for Convolutional Neural Networks.
- Examples:
>>> scaler = CompoundScaler() >>> scaler(1.1, 1.2, [32, 64, 128], [2,2,3])
- __call__(width_factor: float, depth_factor: float, widths: List[int], depths: List[int]) List[int] [source]¶
Scale up widhts and depths using width_factor and depth_factor
- Parameters
width_factor (float) – value used to scale up widths
depth_factor (float) – value used to scale up depths
widths (List[int]) – array where each value is the number of in_features in one layer
depths (List[int]) – array where each value is the number of blocks in one layer
- Returns
scaled widths and depths
- Return type
Union[List[int], List[int]]