def mnist_model_large():
    """
    MNIST model with redundant layers for testing pruning algorithm
    """
    return nn.Sequential(OrderedDict([
        ('conv1', nn.Conv2d(1, 32, (5, 5), padding='same')),
        ('relu1', nn.ReLU()),
        ('pool1', nn.MaxPool2d(2, stride=2, padding=0)),
        ('bn1', nn.BatchNorm2d(32, eps=0.001, momentum=0.01)),
        ('conv2', nn.Conv2d(32, 64, (5, 5), padding='same')),
        ('relu2', nn.ReLU()),
        ('pool2', nn.MaxPool2d(2, stride=2, padding=0)),
        ('conv3', nn.Conv2d(64, 64, (5, 5), padding='same')),
        ('relu3', nn.ReLU()),
        ('conv4', nn.Conv2d(64, 64, (5, 5), padding='same')),
        ('relu4', nn.ReLU()),
        ('flatten', nn.Flatten()),
        ('dense1', nn.Linear(3136, 1024)),
        ('relu5', nn.ReLU()),
        ('dropout', nn.Dropout(p=0.4)),
        ('dense2', nn.Linear(1024, num_classes)),
        ('softmax', nn.LogSoftmax())]))

    MNIST model with redundant layers for testing pruning algorithm
    
coremltools/test/optimize/torch/models/mnist.py