Learning network in loops

Code contains
-learning network in loops
-result of network learning #1