How to create a custom neural network?
Mostrar comentarios más antiguos
Hello!
I am interested in creation of a neural network of the following type: https://www.dropbox.com/s/4x3yn8kchl84vm8/sketch.png this is prestructured network that mimics certain equation. So far i have difficulties with creation of network structure using network function for custom networks.
this is the code as i have it now (i decided to start with 3 inputs first): net=network; net.numInputs = 3; net.numLayers = 2; net.layers{1}.size = 3; net.layers{1}.initFcn = 'initnw'; net.layers{2}.size = 1; net.layers{2}.initFcn = 'initnw';
net.inputConnect(1,1)=1; net.inputConnect(1,2)=1; net.inputConnect(1,3)=1;
net.layerConnect(2,1)=1;
net.outputConnect(2) = 1;
net=init(net); view(net)
net.IW{1,1}=[1;0;0]; net.IW{1,2}=[0;1;0]; net.IW{1,3}=[0;0;1];
The problem is that view does not show the neurons and i cannot connect each of them to certain input. The other question is that in one layer i need neurons of different types (the custom activation function was already programmed). Is it possible to do? maybe it is easier to create 4 layers and connect them as i need?
Thank you in advance! All the answers are appreciated Alexandra
Respuesta aceptada
Más respuestas (1)
Greg Heath
el 4 de Jul. de 2013
The diagram shows 3 neurons in the hidden layer and 1 neuron in the output layer. All transfer functions are 'purelin'. You have no biases.
What you want are
3 inputs
3 parallel hidden layers
1 output layer
4 biases
1 output
Each input is connected to it's own hidden layer with it's own transfer function.
Hope this helps.
Thank you for formally accepting my answer
Greg
2 comentarios
Alexandra
el 5 de Jul. de 2013
Greg Heath
el 5 de Jul. de 2013
Editada: Greg Heath
el 6 de Jul. de 2013
The idea I gave you is the simplest way to do it. if you are having trouble, show your code.
None of the MATLAB NNDATASETS are of the 3-input/1-output regression/curve-fitting type.
help nndatasets
So I will try it on the 2-input engine data set using only the first output.
Categorías
Más información sobre Deep Learning Toolbox en Centro de ayuda y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!