Exemple #1
0
    # draw_network(net.graph, filename = 'autoencoder.png')
    net.pretty_print()
    net.train(epochs=(10, 10),
              validate_after_epochs=1,
              training_accuracy=True,
              show_progress=True,
              early_terminate=True,
              verbose=verbose)


if __name__ == '__main__':
    import sys
    dataset = None
    if len(sys.argv) > 1:
        if sys.argv[1] == 'create_dataset':
            from yann.special.datasets import cook_mnist_normalized_zero_mean as cook_mnist
            data = cook_mnist(verbose=2)
            dataset = data.dataset_location()
        else:
            dataset = sys.argv[1]
    else:
        print "provide dataset"

    if dataset is None:
        print " creating a new dataset to run through"
        from yann.special.datasets import cook_mnist_normalized_zero_mean as cook_mnist
        data = cook_mnist(verbose=2)
        dataset = data.dataset_location()

    autoencoder(dataset, verbose=2)
    convolutional_autoencoder(dataset, verbose=2)
Exemple #2
0
    # See how the network looks like.
    net.pretty_print()

    # Train the network.
    net.train()

    # Test for acccuracy.
    net.test()


## Boiler Plate ##
if __name__ == '__main__':
    dataset = None
    import sys
    if len(sys.argv) > 1:
        if sys.argv[1] == 'create_dataset':
            from yann.special.datasets import cook_mnist
            data = cook_mnist(verbose=3)
            dataset = data.dataset_location()
        else:
            dataset = sys.argv[1]
    else:
        print "provide dataset"

    if dataset is None:
        print " creating a new dataset to run through"
        from yann.special.datasets import cook_mnist
        data = cook_mnist(verbose=3)
        dataset = data.dataset_location()

    log_reg(dataset)
Exemple #3
0
              early_terminate=True,
              verbose=verbose)

    net.test(verbose=verbose)

    ## Boiler Plate ##


if __name__ == '__main__':
    import sys
    dataset = None
    if len(sys.argv) > 1:
        if sys.argv[1] == 'create_dataset':
            from yann.special.datasets import cook_cifar10
            data = cook_cifar10(verbose=2)
            dataset = data.dataset_location()
        else:
            dataset = sys.argv[1]
    else:
        print "provide dataset"

    if dataset is None:
        print " creating a new dataset to run through"
        from yann.special.datasets import cook_cifar10
        from yann.special.datasets import cook_mnist
        # data = cook_cifar10 (verbose = 2)
        data = cook_mnist()
        dataset = data.dataset_location()

    lenet5(dataset, verbose=2)
    # lenet_maxout (dataset, verbose = 3)