fl_sim.models#
This module contains built-in simple models.
Convolutional neural networks (CNN)#
|
Convolutional neural network using MNIST type input. |
|
Convolutional neural network using FEMnist type input. |
|
Tiny version of |
|
Convolutional neural network using CIFAR type input. |
|
Convolutional neural network using CIFAR type input. |
|
Convolutional neural network using CIFAR type input. |
|
ResNet18 model for image classification. |
|
ResNet10 model for image classification. |
Recurrent neural networks (RNN)#
|
Creates a RNN model using LSTM layers for Shakespeare language models (next character prediction task). |
|
Creates a RNN model using LSTM layers for StackOverFlow (next word prediction task). |
|
Stacked |
|
Stacked |
Multilayer perceptron (MLP)#
|
Multi-layer perceptron. |
|
Multi-layer perceptron modified from FedPD/models.py. |
Linear models#
|
Logistic regression model for classification task. |
|
Support vector machine classifier. |
|
Support vector machine regressor. |
Utilities#
|
Reset the parameters of a module and its children. |
|
Top-n accuracy. |
|
Mixin class for classifiers. |
|
Mixin for regressors. |
Mixin for differences of two models. |