cnn#
CNN model in pytorch .. rubric:: References
[1] Reddi S, Charles Z, Zaheer M, et al. Adaptive Federated Optimization. ICML 2020. https://arxiv.org/pdf/2003.00295.pdf
Module Contents#
Used for EMNIST experiments in references[1] |
|
from torch tutorial |
|
- class CNN_FEMNIST(only_digits=False)#
Bases:
torch.nn.Module
Used for EMNIST experiments in references[1] :param only_digits: If True, uses a final layer with 10 outputs, for use with the
digits only MNIST dataset (http://yann.lecun.com/exdb/mnist/). If selfalse, uses 62 outputs for selfederated Extended MNIST (selfEMNIST) EMNIST: Extending MNIST to handwritten letters: https://arxiv.org/abs/1702.05373 Defaluts to True
- Returns:
A torch.nn.Module.
- forward(x)#
- class CNN_MNIST#
Bases:
torch.nn.Module
- forward(x)#
- class CNN_CIFAR10#
Bases:
torch.nn.Module
from torch tutorial https://pytorch.org/tutorials/beginner/blitz/cifar10_tutorial.html
- forward(x)#
- class AlexNet_CIFAR10(num_classes=10)#
Bases:
torch.nn.Module
- forward(x)#