コード例 #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"))
コード例 #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"))
コード例 #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
コード例 #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
コード例 #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
コード例 #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
コード例 #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
コード例 #8
0
ファイル: test_lwta.py プロジェクト: 123fengye741/pylearn2
def test_lwta_yaml():
    """Test simple model on random data."""
    limited_epoch_train(os.path.join(pylearn2.__path__[0],
                                     "models/tests/lwta.yaml"))
コード例 #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"))
コード例 #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"))
コード例 #11
0
def test_hcae_yaml():
    limited_epoch_train(
        os.path.join(pylearn2.__path__[0],
                     "scripts/autoencoder_example/hcae.yaml"))
コード例 #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"))