Basic DeepBeliefNetwork example?

318 views
Skip to first unread message

varrav

unread,
Jan 26, 2014, 4:07:37 PM1/26/14
to accor...@googlegroups.com
Could someone post a simple Accord .NET deep learning example? I've seen the sample one included with the source code, but I'm looking for a bare-minimum example. Something like the following, how would you perform deep learning on it? Thanks.

double inputs[][];
int outputs[]; // 0, 1

// Initialize network.
DeepBeliefNetwork network = new DeepBeliefNetwork(new BernoulliFunction(), 1024, 50, 2);
new GaussianWeights(network).Randomize();
network
.UpdateVisibleWeights();

// Train
???

// Test result
for (int i=0; i<inputs.Length; i++)
{
   
int testOutput = network.Compute(inputs[i]);
   
if (testOutput == outputs[i])
   
{
       
// Correct!
   
}
}


Message has been deleted

varrav

unread,
Jan 28, 2014, 3:53:51 PM1/28/14
to accor...@googlegroups.com
After digging into the demo a bit, I put together a simple deep-learning example for XOR. If anyone else is looking for a basic example, the code is available on github.

The branch "XOR" contains the code sample.
The master branch contains the ASCII digits code sample.

Btw, perhaps this could be useful to others, as an example, in the Accord .NET class documentation for DeepBeliefNetwork?

César

unread,
Jan 29, 2014, 5:11:13 AM1/29/14
to accor...@googlegroups.com
Hello Varrav,

Many thanks for the sample! It is definitely going to be added to the documentation. I was planning to create a documentation demo as well but was still trying to find enough time to do it properly, thanks for the amazing help!

Best regards,
Cesar
Reply all
Reply to author
Forward
0 new messages