direct.nn.mobilenet package#

Submodules#

direct.nn.mobilenet.config module#

class direct.nn.mobilenet.config.MobileNetV2Config(model_name: str = '???', engine_name: str | None = None, num_channels: int = 2, num_classes: int = 1000, width_mult: float = 1.0, inverted_residual_setting: List | None = None, round_nearest: int = 8, norm_layer: str | None = None)[source][source]#

Bases: ModelConfig

inverted_residual_setting: Optional[List] = None#
norm_layer: Optional[str] = None#
num_channels: int = 2#
num_classes: int = 1000#
round_nearest: int = 8#
width_mult: float = 1.0#

direct.nn.mobilenet.mobilenet module#

class direct.nn.mobilenet.mobilenet.MobileNetV2(num_channels=2, num_classes=1000, width_mult=1.0, inverted_residual_setting=None, round_nearest=8, block=None, norm_layer=None)[source][source]#

Bases: Module

forward(x)[source][source]#

Define the computation performed at every call.

Should be overridden by all subclasses.

Note

Although the recipe for forward pass needs to be defined within this function, one should call the Module instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.

training: bool#

Module contents#