Exemplo n.º 1
0
def train_mlp(NET, sgd_params, datasets):
    """Run mlp training test."""
    # Train the net
    NT.train_mlp(NET=NET, \
        sgd_params=sgd_params, \
        datasets=datasets)
    return
Exemplo n.º 2
0
def train_mlp(NET, sgd_params, datasets):
    """Run mlp training test."""
    # Train the net
    NT.train_mlp(NET=NET, \
        sgd_params=sgd_params, \
        datasets=datasets)
    return
Exemplo n.º 3
0
def train_mlp(NET, mlp_params, sgd_params):
    """Run mlp training test."""

    # Load some data to train/validate/test with
    #dataset = 'data/mnist.pkl.gz'
    #datasets = load_udm(dataset)
    dataset = 'data/mnist_batches.npz'
    datasets = load_mnist(dataset)

    # Tell the net that it's not semisupervised, which will force it to use
    # _all_ examples for computing the DEV regularizer.
    NET.is_semisupervised = 0

    # Train the net
    NT.train_mlp(NET=NET, \
        mlp_params=mlp_params, \
        sgd_params=sgd_params, \
        datasets=datasets)
    return 1
Exemplo n.º 4
0
def train_mlp(NET, mlp_params, sgd_params):
    """Run mlp training test."""

    # Load some data to train/validate/test with
    #dataset = 'data/mnist.pkl.gz'
    #datasets = load_udm(dataset)
    dataset = 'data/mnist_batches.npz'
    datasets = load_mnist(dataset)

    # Tell the net that it's not semisupervised, which will force it to use
    # _all_ examples for computing the DEV regularizer.
    NET.is_semisupervised = 0

    # Train the net
    NT.train_mlp(NET=NET, \
        mlp_params=mlp_params, \
        sgd_params=sgd_params, \
        datasets=datasets)
    return