armlet.utils.net module#

class armlet.utils.net.LogRegression(input_size: int, num_classes: int)#

Bases: Module

forward(x)#

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.

class armlet.utils.net.MLP(input_size: int, num_classes: int, n_hidden_layer_1: int = 64, n_hidden_layer_2: int = 32)#

Bases: Module

forward(x)#

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.

class armlet.utils.net.ResNet18(input_size: int, num_classes: int)#

Bases: ResNet

class armlet.utils.net.SVM(input_size: int, num_classes: int)#

Bases: Module

forward(x)#

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.

class armlet.utils.net.VGG11(input_size: int, num_classes: int)#

Bases: VGG

forward(x: Tensor) Tensor#

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.