Input Operation : Vector as Input & Auto Encoder Training (no output type)
Input Operation : Vector as Input & Auto Encoder Training (no output type)
var make = new AEType(error = CrossEntropyErr) var corruptedIn = make corrupted in var out = make onewayTrip (net, corruptedIn)
Type of Corruption
Criteria: How to train (for DistBeliefTrainStyle)
Criteria: How to train (for DistBeliefTrainStyle)
This case class defines how to train the network. Training parameter is defined in this class.
size of mini-batch (default 100)
ratio of negative samples per positive instance. (default 0)
Time interval between batch submission. (default 1.minute)
number of mini-batches between update (default 2)
number of mini-batches between fetching (default 10)
number of v-cores in the spark cluster. (default 1)
StorageLevel that will be used in Spark. (default DISK_ONLY_2)
We recommend set numCores as similar as possible with allocated spark v-cores.
Train Style : Semi-DistBelief Style, Spark-based.
Train Style : Semi-DistBelief Style, Spark-based.
Unlike with DistBelief, this trainer do updates and fetch by master not the workers.
Input Corruption: Drop input as zero.
Input Corruption: Drop input as zero.
If network uses drop-out training, we recommend that you do not use this.
probability of not-dropped. (default 95% = 0.95)
var corrupt = DroppingCorruption(presence = 0.99) var corrupted = corrupt(vector)
If the presence probability is P%
, then this corruption leaves P%
entries of the matrix
Input Corruption: Gaussian
Input Corruption: Gaussian
Mean of noise (default 0.0)
Variance of noise (default 0.1)
var corrupt = GaussianCorruption(variance = 0.1) var corrupted = corrupt(vector)
Trait that describes how to convert input into corrupted matrix
Trait that describes how to convert input into corrupted matrix
Input operation corrupts the given input, and apply network propagations onto matrix representation of input
the type of input
the type of output
Trainer : Stochastic-Style, Multi-Threaded using Spark.
Trainer : Stochastic-Style, Multi-Threaded using Spark.
This is not a implementation using DistBelief Paper. This is between DistBeliefTrainStyle(DBTS) and SingleThreadTrainStyle(STTS). The major difference is whether "updating" is asynchronous(DBTS) or not(MTTS).
Input Operation : VectorTree as Input & Recursive Auto-Encoder Training (no output type)
Input Operation : VectorTree as Input & Recursive Auto-Encoder Training (no output type)
var make = new RAEType(error = CrossEntropyErr) var corruptedIn = make corrupted in var out = make onewayTrip (net, corruptedIn)
This implementation designed as a replica of the traditional RAE in this paper
,We recommend that you should not apply this method to non-AutoEncoder tasks
Spark Partitioner that gives almost-equal partitions.
Spark Partitioner that gives almost-equal partitions.
Use this with RDD.zipWithUniqueId()
Criteria: How to train (for SingleThreadTrainStyle)
Criteria: How to train (for SingleThreadTrainStyle)
This case class defines how to train the network. Training parameter is defined in this class.
size of mini-batch (default 100)
ratio of negative samples per positive instance. (default 0)
Trainer : Stochastic-Style, Single-Threaded
Input Operation : VectorTree as Input & Recursive Auto-Encoder Training (no output type)
Input Operation : VectorTree as Input & Recursive Auto-Encoder Training (no output type)
var make = new RAEType(error = CrossEntropyErr) var corruptedIn = make corrupted in var out = make onewayTrip (net, corruptedIn)
This implementation designed as a replica of the standard RAE (RAE + normalization) in this paper
,We recommend that you should not apply this method to non-AutoEncoder tasks
Criteria: When to stop training
Criteria: When to stop training
This case class defines when to stop training. Training stops if one of the following condition is satisfied.
max(patience, bestIteration * patienceStep)
Validation is done for each validationFreq
iterations,
and whenever current/best loss ratio below improveThreshold,
that iteration is marked as best iteration.
maximum mini-batch iteration count (default 100,000)
default patience count (default 5,000)
multiplier for calculating patience (default x2)
threshold that iteration is marked as "improved" (default 95% = 0.95)
maximum-tolerant loss value. (default 0.0001)
step count for validation (default 100)
Trait that describes style of training
Trait that describes style of training
This trait controls how to train, i.e. Single-threaded or Distributed.
the type of input
the type of output
General Trainer Implementation.
General Trainer Implementation.
This class trains with help of Training Style and Input Operation.
the type of input. Currently, ScalarMatrix and DAG are supported
the type of output Currently, ScalarMatrix and Null are supported
val net:Network = ... // Define Manipulation Type. VectorType, AEType, RAEType and URAEType. val operation = new VectorType( corrupt = GaussianCorruption(variance = 0.1) ) // Define Training Style. SingleThreadTrainStyle vs DistBeliefTrainStyle val style = new SingleThreadTrainStyle( net = net, algorithm = new StochasticGradientDescent(l2decay = 0.0001), make = operation, param = SimpleTrainingCriteria(miniBatch = 8)) // Define Trainer val train = new Trainer( style = style, stops = StoppingCriteria(maxIter = 100000)) // Do Train train.train(set, valid)
To train an autoencoder, you can provide same training set as validation set.
,This trainer is generalized class. Further implementation, you should see several styles.
Trait that describes Training Criteria
Trait of Input Operation : VectorTree as Input.
Trait of Input Operation : VectorTree as Input. This is an Abstract Implementation
Input Operation : VectorTree as Input & Unfolding Recursive Auto Encoder Training (no output type)
Input Operation : VectorTree as Input & Unfolding Recursive Auto Encoder Training (no output type)
::Experimental::
var make = new URAEType(error = CrossEntropyErr) var corruptedIn = make corrupted in var out = make onewayTrip (net, corruptedIn)
This is designed for Unfolding RAE, in this paper
,This cannot be applied into non-AutoEncoder tasks
Input Operation : Vector as Input and output
Input Operation : Vector as Input and output
var make = new VectorType(error = CrossEntropyErr) var corruptedIn = make corrupted in var out = make onewayTrip (net, corruptedIn)
Non-blocking await
Input Corruption: Never corrupts input
Input Corruption: Never corrupts input
var corrupt = NoCorruption(variance = 0.1) var corrupted = corrupt(vector)
Accumulator Param object for DistBelief Train Style.
Package for training.