Answers.Body: <p>You can not use the ready code directly without any manipulation. Because every piece of code is written for specific datasets. In the article that you mentioned, the writer created a small dataset and then he creates an ANN architecture for it. If you want to build an ANN based on Iris dataset, you should think and create an architecture on paper maybe before coding. You should understand the Iris dataset first, I mean you should understand what is going to be your input shapes, and also the shape of weights are related to inputs' shape. After understanding these you should decide the number of layer of your Neural Network. And that tutorial that you followed is explaining all of these clearly. Do not skip and understand everything steps by step.</p>
  
  <p>If you want a build ANN architecture by yourself, you must understand every mathematics behind that. (forward and backward propagation, loss and cost, gradient descent) If you do not want to deal with all of these maths, you can use a library such as Keras, then you can create an ANN easily.</p>
  
  <p>See this as a source, <a href="https://ml-cheatsheet.readthedocs.io/en/latest/" rel="nofollow noreferrer">https://ml-cheatsheet.readthedocs.io/en/latest/</a>
  And you see my Kaggle kernel, I create this network with details and only using numpy. Also I used Keras on another section. You can check; <a href="https://www.kaggle.com/erdemuysal/gender-recognition-with-lr-and-ann" rel="nofollow noreferrer">https://www.kaggle.com/erdemuysal/gender-recognition-with-lr-and-ann</a></p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-12-22T20:37:31.960Z
Answers.LastActivityDate: 2018-12-22T20:37:31.960Z
Answers.UserDisplayName: Erdem Uysal
Body: <p>I tried to build a neural network for working on IRIS dataset using only numpy after reading an article (link: <a href="https://iamtrask.github.io/2015/07/12/basic-python-network/" rel="nofollow noreferrer">https://iamtrask.github.io/2015/07/12/basic-python-network/</a>).</p>
  
  <p>I tried to search the internet but everyone was using ml libraries and found no solution using just numpy. I tried to add different hidden layers to my feed forward neural network still it wasn't converging. I tried to use backpropagation. I used sigmoid and also relu neither of which was successful. </p>
  
  <p>Can someone please give me the code which will work on IRIS dataset and built only using feed forward neural networks and numpy as the only library or if it is not possible to built such a thing with these constraints then please let me know what goes wrong with these constraints.</p>
  
  <p>Also tell me will it be possible to create a neural network to predict values of a matrix multiplication i.e. if we have A * B = C with matrix A as input and C as output, can we acheive substantial amount of accuracy with feed forward neural networks here?.  </p>
  
Tags: <neural-networks><deep-learning><backpropagation><gradient-descent><feedforward-neural-networks>
Title: Feed forward neural network using numpy for IRIS dataset
UserDisplayName: Nishant Ingle
ThreadText: # Feed forward neural network using numpy for IRIS dataset
  
  (Asked by: username_0 on 2018-12-22)
  
  I tried to build a neural network for working on IRIS dataset using only numpy after reading an article (link: <https://iamtrask.github.io/2015/07/12/basic-python-network/>).
  
  I tried to search the internet but everyone was using ml libraries and found no solution using just numpy. I tried to add different hidden layers to my feed forward neural network still it wasn't converging. I tried to use backpropagation. I used sigmoid and also relu neither of which was successful.
  
  Can someone please give me the code which will work on IRIS dataset and built only using feed forward neural networks and numpy as the only library or if it is not possible to built such a thing with these constraints then please let me know what goes wrong with these constraints.
  
  Also tell me will it be possible to create a neural network to predict values of a matrix multiplication i.e. if we have A \* B = C with matrix A as input and C as output, can we acheive substantial amount of accuracy with feed forward neural networks here?.
  
  **Tags:** neural-networks, deep-learning, backpropagation, gradient-descent, feedforward-neural-networks
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2018-12-22. Score: 2 | Accepted answer
  
  You can not use the ready code directly without any manipulation. Because every piece of code is written for specific datasets. In the article that you mentioned, the writer created a small dataset and then he creates an ANN architecture for it. If you want to build an ANN based on Iris dataset, you should think and create an architecture on paper maybe before coding. You should understand the Iris dataset first, I mean you should understand what is going to be your input shapes, and also the shape of weights are related to inputs' shape. After understanding these you should decide the number of layer of your Neural Network. And that tutorial that you followed is explaining all of these clearly. Do not skip and understand everything steps by step.
  
  If you want a build ANN architecture by yourself, you must understand every mathematics behind that. (forward and backward propagation, loss and cost, gradient descent) If you do not want to deal with all of these maths, you can use a library such as Keras, then you can create an ANN easily.
  
  See this as a source, <https://ml-cheatsheet.readthedocs.io/en/latest/>
  And you see my Kaggle kernel, I create this network with details and only using numpy. Also I used Keras on another section. You can check; <https://www.kaggle.com/username_1/gender-recognition-with-lr-and-ann>
  
  
  ---
  
  