Ejemplo n.º 1
0
def test_dae_yaml():
    """
    Train a denoising autoencoder for a single epoch
    """
    limited_epoch_train(
        os.path.join(pylearn2.__path__[0],
                     "scripts/autoencoder_example/dae.yaml"))
Ejemplo n.º 2
0
def test_hcae_yaml():
    """
    Train a higher order contractive autoencoder for a single epoch
    """
    limited_epoch_train(
        os.path.join(pylearn2.__path__[0],
                     "scripts/autoencoder_example/hcae.yaml"))
Ejemplo n.º 3
0
def test_mnist():
    """
    Tests mnist.yaml by running it for only one epoch
    """

    skip_if_no_data()
    limited_epoch_train(os.path.join(yaml_file_path, 'mnist.yaml'))
    try:
        os.remove(os.path.join(save_path, 'mnist.pkl'))
        os.remove(os.path.join(save_path, 'mnist_best.pkl'))
    except:
        pass
Ejemplo n.º 4
0
def test_mnist():
    """
    Tests mnist.yaml by running it for only one epoch
    """

    skip_if_no_data()
    limited_epoch_train(os.path.join(yaml_file_path, 'mnist.yaml'))
    try:
        os.remove(os.path.join(save_path, 'mnist.pkl'))
        os.remove(os.path.join(save_path, 'mnist_best.pkl'))
    except:
        pass
Ejemplo n.º 5
0
def test_mnist():
    """
    Tests mnist.yaml by running it for only one epoch
    """
    if config.mode == "DEBUG_MODE":
        yaml_file = 'mnist_fast'
    else:
        yaml_file = 'mnist'
    skip_if_no_data()
    limited_epoch_train(os.path.join(yaml_file_path, '%s.yaml' % yaml_file))
    try:
        os.remove(os.path.join(save_path, '%s.pkl' % yaml_file))
        os.remove(os.path.join(save_path, '%s_best.pkl' % yaml_file))
    except:
        pass
Ejemplo n.º 6
0
def test_mnist():
    """
    Tests mnist.yaml by running it for only one epoch
    """
    skip_if_no_data()
    mode = get_default_mode()
    if hasattr(mode, "check_py_code"):
        old_value = mode.check_py_code
        mode.check_py_code = False
    try:
        if config.mode == "DEBUG_MODE":
            yaml_file = "mnist_fast"
        else:
            yaml_file = "mnist"
        limited_epoch_train(os.path.join(yaml_file_path, "%s.yaml" % yaml_file))
        try:
            os.remove(os.path.join(save_path, "%s.pkl" % yaml_file))
            os.remove(os.path.join(save_path, "%s_best.pkl" % yaml_file))
        except Exception:
            pass
    finally:
        if hasattr(mode, "check_py_code"):
            mode.check_py_code = old_value
Ejemplo n.º 7
0
def test_mnist():
    """
    Tests mnist.yaml by running it for only one epoch
    """
    skip_if_no_data()
    mode = get_default_mode()
    if hasattr(mode, 'check_py_code'):
        old_value = mode.check_py_code
        mode.check_py_code = False
    try:
        if config.mode == "DEBUG_MODE":
            yaml_file = 'mnist_fast'
        else:
            yaml_file = 'mnist'
        limited_epoch_train(os.path.join(yaml_file_path, '%s.yaml'
                                         % yaml_file))
        try:
            os.remove(os.path.join(save_path, '%s.pkl' % yaml_file))
            os.remove(os.path.join(save_path, '%s_best.pkl' % yaml_file))
        except Exception:
            pass
    finally:
        if hasattr(mode, 'check_py_code'):
            mode.check_py_code = old_value
Ejemplo n.º 8
0
def test_lwta_yaml():
    """Test simple model on random data."""
    limited_epoch_train(os.path.join(pylearn2.__path__[0],
                                     "models/tests/lwta.yaml"))
Ejemplo n.º 9
0
def test_hcae_yaml():
    """
    Train a higher order contractive autoencoder for a single epoch
    """
    limited_epoch_train(os.path.join(pylearn2.__path__[0],
                                     "scripts/autoencoder_example/hcae.yaml"))
Ejemplo n.º 10
0
def test_dae_yaml():
    """
    Train a denoising autoencoder for a single epoch
    """
    limited_epoch_train(os.path.join(pylearn2.__path__[0],
                                     "scripts/autoencoder_example/dae.yaml"))
Ejemplo n.º 11
0
def test_hcae_yaml():
    limited_epoch_train(
        os.path.join(pylearn2.__path__[0],
                     "scripts/autoencoder_example/hcae.yaml"))
Ejemplo n.º 12
0
def test_lwta_yaml():
    """Test simple model on random data."""
    limited_epoch_train(
        os.path.join(pylearn2.__path__[0], "models/tests/lwta.yaml"))