Making Neural Networks dynamic

Hi, I've been learning about neural networks. I've been managed to have a basic program set up where I can hard code the layers via calling a class and giving it the number of inputs there are and how many nodes there are in the next layer.

I was hoping to make that part of the neural network dynamic. So when first starting up the neural network it would ask how many layers you want, then for each layer it will ask how many inputs/neurons connected to that layer there are and how many outputs is that layer then connected to.

I got that to work, currently the weights are being made randomly still working out back propagation. However I don't know how to access the first element of the first matrix In my list of objects. I can access the first element of all objects but no just the first element of the first object.

Am I doing it wrong are the layers supposed to be hard coded? I have tried to look this question up online but it seems my search terms may not be quite right, as I am only finding out how to output the first element of all the matrix in a tuple.

The github for those who want a closer look at the code.

I couldn't add images so here is a imgur link to them

0 comments · 100% upvoted · other discussions

comments

No public comments to show.