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
def train_ss_mlp(NET, sgd_params, datasets): """Run semi-supervised EA-regularized test.""" # Run training on the given NET NT.train_ss_mlp(NET=NET, \ sgd_params=sgd_params, \ datasets=datasets) return
def train_dae(NET, dae_layer, sgd_params, datasets): """Run DAE training test.""" # Run denoising autoencoder training on the given layer of NET NT.train_dae(NET=NET, \ dae_layer=dae_layer, \ sgd_params=sgd_params, \ datasets=datasets) return
def train_dae(NET, dae_layer, mlp_params, sgd_params): """Run DAE training test.""" # Load some data to train/validate/test with dataset = 'data/mnist.pkl.gz' datasets = load_udm(dataset) # Run denoising autoencoder training on the given layer of NET NT.train_dae(NET=NET, \ dae_layer=dae_layer, \ mlp_params=mlp_params, \ sgd_params=sgd_params, \ datasets=datasets) return 1
def train_dae(NET, dae_layer, mlp_params, sgd_params): """Run DAE training test.""" # Load some data to train/validate/test with dataset = 'data/mnist.pkl.gz' datasets = load_udm(dataset) # Run denoising autoencoder training on the given layer of NET NT.train_dae(NET=NET, \ dae_layer=dae_layer, \ mlp_params=mlp_params, \ sgd_params=sgd_params, \ datasets=datasets) return
def train_ss_mlp(NET, mlp_params, sgd_params, rng, su_count=1000): """Run semisupervised DEV-regularized test.""" # Load some data to train/validate/test with dataset = 'data/mnist.pkl.gz' datasets = load_udm_ss(dataset, su_count, rng) # Tell the net that it's semisupervised, which will force it to use only # unlabeled examples for computing the DEV regularizer. NET.is_semisupervised = 1 # Run training on the given NET NT.train_ss_mlp(NET=NET, \ mlp_params=mlp_params, \ sgd_params=sgd_params, \ datasets=datasets) return 1
def train_ss_mlp(NET, mlp_params, sgd_params, rng, su_count=1000): """Run semisupervised DEV-regularized test.""" # Load some data to train/validate/test with dataset = 'data/mnist.pkl.gz' datasets = load_udm_ss(dataset, su_count, rng) # Tell the net that it's semisupervised, which will force it to use only # unlabeled examples for computing the DEV regularizer. NET.is_semisupervised = 1 # Run training on the given NET NT.train_ss_mlp(NET=NET, \ mlp_params=mlp_params, \ sgd_params=sgd_params, \ datasets=datasets) return
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
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