fedsim.models package — fedsim 0.1 documentation

# fedsim.models package

## Submodules

## fedsim.models.mcmahan_nets module

class fedsim.models.mcmahan_nets.cnn_cifar10(num_classes=10, num_channels=3, input_size=(24, 24))

  Bases: `torch.nn.modules.module.Module`

  forward(x)

    Defines 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

class fedsim.models.mcmahan_nets.cnn_cifar100(num_classes=100, num_channels=3, input_size=(24, 24))

  Bases: `fedsim.models.mcmahan_nets.cnn_cifar10`

  training: bool

class fedsim.models.mcmahan_nets.cnn_mnist(num_classes=10, num_channels=1)

  Bases: `torch.nn.modules.module.Module`

  forward(x)

    Defines 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

class fedsim.models.mcmahan_nets.mlp_mnist(num_classes=10, num_channels=1)

  Bases: `torch.nn.modules.module.Module`

  forward(x)

    Defines 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