public NeuralNetworkVectorized createPreTrainingLayer(Matrix input,
int nVisible, int nHidden, Matrix weights, Matrix hBias,
Matrix vBias, RandomGenerator rng, int index) {
if (index == 0) {
return new ContinuousRestrictedBoltzmannMachine(input, nVisible, nHidden, weights, hBias, vBias, rng);
} else {
return new RestrictedBoltzmannMachine(input, nVisible, nHidden, weights, hBias, vBias, rng);
}
}