models#

Package Contents#

CNN_CIFAR10

from torch tutorial

CNN_FEMNIST

Used for EMNIST experiments in references[1]

CNN_MNIST

RNN_Shakespeare

MLP

MLP_CelebA

Used for celeba experiment

class CNN_CIFAR10#

Bases: torch.nn.Module

from torch tutorial https://pytorch.org/tutorials/beginner/blitz/cifar10_tutorial.html

forward(x)#
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 RNN_Shakespeare(vocab_size=80, embedding_dim=8, hidden_size=256)#

Bases: torch.nn.Module

forward(input_seq)#
class MLP(input_size, output_size)#

Bases: torch.nn.Module

forward(x)#
class MLP_CelebA#

Bases: torch.nn.Module

Used for celeba experiment

forward(x)#