The sample app looks really great.
There is an application called Visual-RBM which can train RBMs at a really high speed using the GPU. It can export out the results in the following format:
float[v] Visible biases
float[h] Hidden biases
float[v * h] Weights
In this way I can get all the layers trained unsupervised using Visual-RBM. Could you point me in the right direction to import these trained parameters into the Accord.NET application? What can you think of what objects/classes should be modified so I can import these trained RBMs?
Thank you for your help,
Peter
int v = 0, h = 0;
float[] visibleBiases = new float[v];
float[] hiddenBiases = new float[h];
float[,] weights = new float[v, h];
// Create a new deep belief network with v inputs and h outputs
DeepBeliefNetwork network = new DeepBeliefNetwork(inputsCount: v, hiddenNeurons: h);
// Load visible thresholds (often are negative of the bias)
StochasticLayer visibleLayer = network.Machines[0].Visible;
for (int i = 0; i < visibleBiases.Length; i++)
visibleLayer.Neurons[i].Threshold = -visibleBiases[i];
// Load hidden thresholds (often are negative of the bias)
StochasticLayer hiddenLayer = network.Machines[0].Hidden;
for (int i = 0; i < hiddenBiases.Length; i++)
visibleLayer.Neurons[i].Threshold = -hiddenBiases[i];
// Load the weights into the hidden layer
for (int i = 0; i < v; i++)
for (int j = 0; j < h; j++)
hiddenLayer.Neurons[i].Weights[j] = weights[i, j];
// Copy the reversed weights from the hidden layers. This makes
// the weights tied so inputs can be reconstructed from outputs.
network.UpdateVisibleWeights();