Skip to content
This repository has been archived by the owner on Nov 19, 2020. It is now read-only.

Add an Example for DeepNeuralNetworkLearning Class #380

Closed
fsps60312 opened this issue Jan 15, 2017 · 3 comments
Closed

Add an Example for DeepNeuralNetworkLearning Class #380

fsps60312 opened this issue Jan 15, 2017 · 3 comments

Comments

@fsps60312
Copy link

Please add an example for DeepNeuralNetworkLearning Class.

TODO (optional): Describe a specific scenario you would like to see addressed.

Help Topic: http://accord-framework.net/docs/html/T_Accord_Neuro_Learning_DeepNeuralNetworkLearning.htm

@fsps60312
Copy link
Author

fsps60312 commented Jan 16, 2017

I ran the code with 3 lines:

Accord.Neuro.Networks.DeepBeliefNetwork neuroNetwork = new Accord.Neuro.Networks.DeepBeliefNetwork(2, 2);
Accord.Neuro.Learning.DeepNeuralNetworkLearning deepLearning = new Accord.Neuro.Learning.DeepNeuralNetworkLearning(neuroNetwork);
deepLearning.Run(new double[2], new double[2]);

It crashed with NullReferenceException and I don't know why.

@MaddalenaTech
Copy link

IT goes null because you got to assign a learning algorithm:

var neuroNetwork = new Accord.Neuro.Networks.DeepBeliefNetwork(2, 2);
var deepLearning = new Accord.Neuro.Learning.DeepNeuralNetworkLearning(neuroNetwork);
deepLearning.Algorithm = (activationNetwork, index) => new BackPropagationLearning(activationNetwork);

deepLearning.Run(new double[2], new double[2]);

@cesarsouza
Copy link
Member

The Accord.Neuro namespace will be replaced by https://github.com/cesarsouza/keras-sharp. This issue might not be relevant once this happens, so I am closing it for now.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants