<b>Question 3. Determine the weights of a network with 4 input and 2 output units using a) Perceptron learning rule b) Delta learning rule with 
\begin{align}
f(x) = \frac{1}{1+e^{-x}}
\end{align}
for the following input-output pairs <br>
\begin{align}
Input: [1100]^T [1001]^T [0011]^T [0110]^T \\
Output: [11]^T [10]^T [01]^T [00]^T 
\end{align}<br>
Give your results for different choices of learning rate parameters.</b>

<b>Answer 3.</b>


```python
import numpy as np
```

<b>For Perceptron learning rule:</b>


```python
class Perceptron(object):
    def __init__(self, input_size, lr=0.1, epochs=1000):
        self.W_a = np.zeros(input_size+1)
        self.W_b = np.zeros(input_size+1)
        self.epochs = epochs
        self.lr = lr
        
    def activation(self, x):
        return 1 if x>=0 else 0
    
    def predict(self, x):
        z1 = self.W_a.T.dot(x)
        z2 = self.W_b.T.dot(x)
        a1 = self.activation(z1)
        a2 = self.activation(z2)
        return a1, a2
    
    def fit(self, X, d):
        for _ in range(self.epochs):
            print("Coming in for epoch {}".format(_))
            for i in range(d.shape[0]):
                x = np.insert(X[i], 0, 1)
                y1, y2 = self.predict(x)
                e1 = d[i][0] - y1
                e2 = d[i][1] - y2
                self.W_a = self.W_a + self.lr * e1 * x
                self.W_b = self.W_b + self.lr * e2 * x
```


```python
X = np.array([
[1, 1, 0, 0],[1, 0, 0, 1],[0, 0, 1, 1],[0, 1, 1, 0]
])
d = np.array([[1, 1],[1, 0],[0, 1],[0, 0]])
perceptron = Perceptron(input_size=4)
perceptron.fit(X, d)
```

    Coming in for epoch 0
    Coming in for epoch 1
    Coming in for epoch 2
    Coming in for epoch 3
    Coming in for epoch 4
    Coming in for epoch 5
    Coming in for epoch 6
    Coming in for epoch 7
    Coming in for epoch 8
    Coming in for epoch 9
    Coming in for epoch 10
    Coming in for epoch 11
    Coming in for epoch 12
    Coming in for epoch 13
    Coming in for epoch 14
    Coming in for epoch 15
    Coming in for epoch 16
    Coming in for epoch 17
    Coming in for epoch 18
    Coming in for epoch 19
    Coming in for epoch 20
    Coming in for epoch 21
    Coming in for epoch 22
    Coming in for epoch 23
    Coming in for epoch 24
    Coming in for epoch 25
    Coming in for epoch 26
    Coming in for epoch 27
    Coming in for epoch 28
    Coming in for epoch 29
    Coming in for epoch 30
    Coming in for epoch 31
    Coming in for epoch 32
    Coming in for epoch 33
    Coming in for epoch 34
    Coming in for epoch 35
    Coming in for epoch 36
    Coming in for epoch 37
    Coming in for epoch 38
    Coming in for epoch 39
    Coming in for epoch 40
    Coming in for epoch 41
    Coming in for epoch 42
    Coming in for epoch 43
    Coming in for epoch 44
    Coming in for epoch 45
    Coming in for epoch 46
    Coming in for epoch 47
    Coming in for epoch 48
    Coming in for epoch 49
    Coming in for epoch 50
    Coming in for epoch 51
    Coming in for epoch 52
    Coming in for epoch 53
    Coming in for epoch 54
    Coming in for epoch 55
    Coming in for epoch 56
    Coming in for epoch 57
    Coming in for epoch 58
    Coming in for epoch 59
    Coming in for epoch 60
    Coming in for epoch 61
    Coming in for epoch 62
    Coming in for epoch 63
    Coming in for epoch 64
    Coming in for epoch 65
    Coming in for epoch 66
    Coming in for epoch 67
    Coming in for epoch 68
    Coming in for epoch 69
    Coming in for epoch 70
    Coming in for epoch 71
    Coming in for epoch 72
    Coming in for epoch 73
    Coming in for epoch 74
    Coming in for epoch 75
    Coming in for epoch 76
    Coming in for epoch 77
    Coming in for epoch 78
    Coming in for epoch 79
    Coming in for epoch 80
    Coming in for epoch 81
    Coming in for epoch 82
    Coming in for epoch 83
    Coming in for epoch 84
    Coming in for epoch 85
    Coming in for epoch 86
    Coming in for epoch 87
    Coming in for epoch 88
    Coming in for epoch 89
    Coming in for epoch 90
    Coming in for epoch 91
    Coming in for epoch 92
    Coming in for epoch 93
    Coming in for epoch 94
    Coming in for epoch 95
    Coming in for epoch 96
    Coming in for epoch 97
    Coming in for epoch 98
    Coming in for epoch 99
    Coming in for epoch 100
    Coming in for epoch 101
    Coming in for epoch 102
    Coming in for epoch 103
    Coming in for epoch 104
    Coming in for epoch 105
    Coming in for epoch 106
    Coming in for epoch 107
    Coming in for epoch 108
    Coming in for epoch 109
    Coming in for epoch 110
    Coming in for epoch 111
    Coming in for epoch 112
    Coming in for epoch 113
    Coming in for epoch 114
    Coming in for epoch 115
    Coming in for epoch 116
    Coming in for epoch 117
    Coming in for epoch 118
    Coming in for epoch 119
    Coming in for epoch 120
    Coming in for epoch 121
    Coming in for epoch 122
    Coming in for epoch 123
    Coming in for epoch 124
    Coming in for epoch 125
    Coming in for epoch 126
    Coming in for epoch 127
    Coming in for epoch 128
    Coming in for epoch 129
    Coming in for epoch 130
    Coming in for epoch 131
    Coming in for epoch 132
    Coming in for epoch 133
    Coming in for epoch 134
    Coming in for epoch 135
    Coming in for epoch 136
    Coming in for epoch 137
    Coming in for epoch 138
    Coming in for epoch 139
    Coming in for epoch 140
    Coming in for epoch 141
    Coming in for epoch 142
    Coming in for epoch 143
    Coming in for epoch 144
    Coming in for epoch 145
    Coming in for epoch 146
    Coming in for epoch 147
    Coming in for epoch 148
    Coming in for epoch 149
    Coming in for epoch 150
    Coming in for epoch 151
    Coming in for epoch 152
    Coming in for epoch 153
    Coming in for epoch 154
    Coming in for epoch 155
    Coming in for epoch 156
    Coming in for epoch 157
    Coming in for epoch 158
    Coming in for epoch 159
    Coming in for epoch 160
    Coming in for epoch 161
    Coming in for epoch 162
    Coming in for epoch 163
    Coming in for epoch 164
    Coming in for epoch 165
    Coming in for epoch 166
    Coming in for epoch 167
    Coming in for epoch 168
    Coming in for epoch 169
    Coming in for epoch 170
    Coming in for epoch 171
    Coming in for epoch 172
    Coming in for epoch 173
    Coming in for epoch 174
    Coming in for epoch 175
    Coming in for epoch 176
    Coming in for epoch 177
    Coming in for epoch 178
    Coming in for epoch 179
    Coming in for epoch 180
    Coming in for epoch 181
    Coming in for epoch 182
    Coming in for epoch 183
    Coming in for epoch 184
    Coming in for epoch 185
    Coming in for epoch 186
    Coming in for epoch 187
    Coming in for epoch 188
    Coming in for epoch 189
    Coming in for epoch 190
    Coming in for epoch 191
    Coming in for epoch 192
    Coming in for epoch 193
    Coming in for epoch 194
    Coming in for epoch 195
    Coming in for epoch 196
    Coming in for epoch 197
    Coming in for epoch 198
    Coming in for epoch 199
    Coming in for epoch 200
    Coming in for epoch 201
    Coming in for epoch 202
    Coming in for epoch 203
    Coming in for epoch 204
    Coming in for epoch 205
    Coming in for epoch 206
    Coming in for epoch 207
    Coming in for epoch 208
    Coming in for epoch 209
    Coming in for epoch 210
    Coming in for epoch 211
    Coming in for epoch 212
    Coming in for epoch 213
    Coming in for epoch 214
    Coming in for epoch 215
    Coming in for epoch 216
    Coming in for epoch 217
    Coming in for epoch 218
    Coming in for epoch 219
    Coming in for epoch 220
    Coming in for epoch 221
    Coming in for epoch 222
    Coming in for epoch 223
    Coming in for epoch 224
    Coming in for epoch 225
    Coming in for epoch 226
    Coming in for epoch 227
    Coming in for epoch 228
    Coming in for epoch 229
    Coming in for epoch 230
    Coming in for epoch 231
    Coming in for epoch 232
    Coming in for epoch 233
    Coming in for epoch 234
    Coming in for epoch 235
    Coming in for epoch 236
    Coming in for epoch 237
    Coming in for epoch 238
    Coming in for epoch 239
    Coming in for epoch 240
    Coming in for epoch 241
    Coming in for epoch 242
    Coming in for epoch 243
    Coming in for epoch 244
    Coming in for epoch 245
    Coming in for epoch 246
    Coming in for epoch 247
    Coming in for epoch 248
    Coming in for epoch 249
    Coming in for epoch 250
    Coming in for epoch 251
    Coming in for epoch 252
    Coming in for epoch 253
    Coming in for epoch 254
    Coming in for epoch 255
    Coming in for epoch 256
    Coming in for epoch 257
    Coming in for epoch 258
    Coming in for epoch 259
    Coming in for epoch 260
    Coming in for epoch 261
    Coming in for epoch 262
    Coming in for epoch 263
    Coming in for epoch 264
    Coming in for epoch 265
    Coming in for epoch 266
    Coming in for epoch 267
    Coming in for epoch 268
    Coming in for epoch 269
    Coming in for epoch 270
    Coming in for epoch 271
    Coming in for epoch 272
    Coming in for epoch 273
    Coming in for epoch 274
    Coming in for epoch 275
    Coming in for epoch 276
    Coming in for epoch 277
    Coming in for epoch 278
    Coming in for epoch 279
    Coming in for epoch 280
    Coming in for epoch 281
    Coming in for epoch 282
    Coming in for epoch 283
    Coming in for epoch 284
    Coming in for epoch 285
    Coming in for epoch 286
    Coming in for epoch 287
    Coming in for epoch 288
    Coming in for epoch 289
    Coming in for epoch 290
    Coming in for epoch 291
    Coming in for epoch 292
    Coming in for epoch 293
    Coming in for epoch 294
    Coming in for epoch 295
    Coming in for epoch 296
    Coming in for epoch 297
    Coming in for epoch 298
    Coming in for epoch 299
    Coming in for epoch 300
    Coming in for epoch 301
    Coming in for epoch 302
    Coming in for epoch 303
    Coming in for epoch 304
    Coming in for epoch 305
    Coming in for epoch 306
    Coming in for epoch 307
    Coming in for epoch 308
    Coming in for epoch 309
    Coming in for epoch 310
    Coming in for epoch 311
    Coming in for epoch 312
    Coming in for epoch 313
    Coming in for epoch 314
    Coming in for epoch 315
    Coming in for epoch 316
    Coming in for epoch 317
    Coming in for epoch 318
    Coming in for epoch 319
    Coming in for epoch 320
    Coming in for epoch 321
    Coming in for epoch 322
    Coming in for epoch 323
    Coming in for epoch 324
    Coming in for epoch 325
    Coming in for epoch 326
    Coming in for epoch 327
    Coming in for epoch 328
    Coming in for epoch 329
    Coming in for epoch 330
    Coming in for epoch 331
    Coming in for epoch 332
    Coming in for epoch 333
    Coming in for epoch 334
    Coming in for epoch 335
    Coming in for epoch 336
    Coming in for epoch 337
    Coming in for epoch 338
    Coming in for epoch 339
    Coming in for epoch 340
    Coming in for epoch 341
    Coming in for epoch 342
    Coming in for epoch 343
    Coming in for epoch 344
    Coming in for epoch 345
    Coming in for epoch 346
    Coming in for epoch 347
    Coming in for epoch 348
    Coming in for epoch 349
    Coming in for epoch 350
    Coming in for epoch 351
    Coming in for epoch 352
    Coming in for epoch 353
    Coming in for epoch 354
    Coming in for epoch 355
    Coming in for epoch 356
    Coming in for epoch 357
    Coming in for epoch 358
    Coming in for epoch 359
    Coming in for epoch 360
    Coming in for epoch 361
    Coming in for epoch 362
    Coming in for epoch 363
    Coming in for epoch 364
    Coming in for epoch 365
    Coming in for epoch 366
    Coming in for epoch 367
    Coming in for epoch 368
    Coming in for epoch 369
    Coming in for epoch 370
    Coming in for epoch 371
    Coming in for epoch 372
    Coming in for epoch 373
    Coming in for epoch 374
    Coming in for epoch 375
    Coming in for epoch 376
    Coming in for epoch 377
    Coming in for epoch 378
    Coming in for epoch 379
    Coming in for epoch 380
    Coming in for epoch 381
    Coming in for epoch 382
    Coming in for epoch 383
    Coming in for epoch 384
    Coming in for epoch 385
    Coming in for epoch 386
    Coming in for epoch 387
    Coming in for epoch 388
    Coming in for epoch 389
    Coming in for epoch 390
    Coming in for epoch 391
    Coming in for epoch 392
    Coming in for epoch 393
    Coming in for epoch 394
    Coming in for epoch 395
    Coming in for epoch 396
    Coming in for epoch 397
    Coming in for epoch 398
    Coming in for epoch 399
    Coming in for epoch 400
    Coming in for epoch 401
    Coming in for epoch 402
    Coming in for epoch 403
    Coming in for epoch 404
    Coming in for epoch 405
    Coming in for epoch 406
    Coming in for epoch 407
    Coming in for epoch 408
    Coming in for epoch 409
    Coming in for epoch 410
    Coming in for epoch 411
    Coming in for epoch 412
    Coming in for epoch 413
    Coming in for epoch 414
    Coming in for epoch 415
    Coming in for epoch 416
    Coming in for epoch 417
    Coming in for epoch 418
    Coming in for epoch 419
    Coming in for epoch 420
    Coming in for epoch 421
    Coming in for epoch 422
    Coming in for epoch 423
    Coming in for epoch 424
    Coming in for epoch 425
    Coming in for epoch 426
    Coming in for epoch 427
    Coming in for epoch 428
    Coming in for epoch 429
    Coming in for epoch 430
    Coming in for epoch 431
    Coming in for epoch 432
    Coming in for epoch 433
    Coming in for epoch 434
    Coming in for epoch 435
    Coming in for epoch 436
    Coming in for epoch 437
    Coming in for epoch 438
    Coming in for epoch 439
    Coming in for epoch 440
    Coming in for epoch 441
    Coming in for epoch 442
    Coming in for epoch 443
    Coming in for epoch 444
    Coming in for epoch 445
    Coming in for epoch 446
    Coming in for epoch 447
    Coming in for epoch 448
    Coming in for epoch 449
    Coming in for epoch 450
    Coming in for epoch 451
    Coming in for epoch 452
    Coming in for epoch 453
    Coming in for epoch 454
    Coming in for epoch 455
    Coming in for epoch 456
    Coming in for epoch 457
    Coming in for epoch 458
    Coming in for epoch 459
    Coming in for epoch 460
    Coming in for epoch 461
    Coming in for epoch 462
    Coming in for epoch 463
    Coming in for epoch 464
    Coming in for epoch 465
    Coming in for epoch 466
    Coming in for epoch 467
    Coming in for epoch 468
    Coming in for epoch 469
    Coming in for epoch 470
    Coming in for epoch 471
    Coming in for epoch 472
    Coming in for epoch 473
    Coming in for epoch 474
    Coming in for epoch 475
    Coming in for epoch 476
    Coming in for epoch 477
    Coming in for epoch 478
    Coming in for epoch 479
    Coming in for epoch 480
    Coming in for epoch 481
    Coming in for epoch 482
    Coming in for epoch 483
    Coming in for epoch 484
    Coming in for epoch 485
    Coming in for epoch 486
    Coming in for epoch 487
    Coming in for epoch 488
    Coming in for epoch 489
    Coming in for epoch 490
    Coming in for epoch 491
    Coming in for epoch 492
    Coming in for epoch 493
    Coming in for epoch 494
    Coming in for epoch 495
    Coming in for epoch 496
    Coming in for epoch 497
    Coming in for epoch 498
    Coming in for epoch 499
    Coming in for epoch 500
    Coming in for epoch 501
    Coming in for epoch 502
    Coming in for epoch 503
    Coming in for epoch 504
    Coming in for epoch 505
    Coming in for epoch 506
    Coming in for epoch 507
    Coming in for epoch 508
    Coming in for epoch 509
    Coming in for epoch 510
    Coming in for epoch 511
    Coming in for epoch 512
    Coming in for epoch 513
    Coming in for epoch 514
    Coming in for epoch 515
    Coming in for epoch 516
    Coming in for epoch 517
    Coming in for epoch 518
    Coming in for epoch 519
    Coming in for epoch 520
    Coming in for epoch 521
    Coming in for epoch 522
    Coming in for epoch 523
    Coming in for epoch 524
    Coming in for epoch 525
    Coming in for epoch 526
    Coming in for epoch 527
    Coming in for epoch 528
    Coming in for epoch 529
    Coming in for epoch 530
    Coming in for epoch 531
    Coming in for epoch 532
    Coming in for epoch 533
    Coming in for epoch 534
    Coming in for epoch 535
    Coming in for epoch 536
    Coming in for epoch 537
    Coming in for epoch 538
    Coming in for epoch 539
    Coming in for epoch 540
    Coming in for epoch 541
    Coming in for epoch 542
    Coming in for epoch 543
    Coming in for epoch 544
    Coming in for epoch 545
    Coming in for epoch 546
    Coming in for epoch 547
    Coming in for epoch 548
    Coming in for epoch 549
    Coming in for epoch 550
    Coming in for epoch 551
    Coming in for epoch 552
    Coming in for epoch 553
    Coming in for epoch 554
    Coming in for epoch 555
    Coming in for epoch 556
    Coming in for epoch 557
    Coming in for epoch 558
    Coming in for epoch 559
    Coming in for epoch 560
    Coming in for epoch 561
    Coming in for epoch 562
    Coming in for epoch 563
    Coming in for epoch 564
    Coming in for epoch 565
    Coming in for epoch 566
    Coming in for epoch 567
    Coming in for epoch 568
    Coming in for epoch 569
    Coming in for epoch 570
    Coming in for epoch 571
    Coming in for epoch 572
    Coming in for epoch 573
    Coming in for epoch 574
    Coming in for epoch 575
    Coming in for epoch 576
    Coming in for epoch 577
    Coming in for epoch 578
    Coming in for epoch 579
    Coming in for epoch 580
    Coming in for epoch 581
    Coming in for epoch 582
    Coming in for epoch 583
    Coming in for epoch 584
    Coming in for epoch 585
    Coming in for epoch 586
    Coming in for epoch 587
    Coming in for epoch 588
    Coming in for epoch 589
    Coming in for epoch 590
    Coming in for epoch 591
    Coming in for epoch 592
    Coming in for epoch 593
    Coming in for epoch 594
    Coming in for epoch 595
    Coming in for epoch 596
    Coming in for epoch 597
    Coming in for epoch 598
    Coming in for epoch 599
    Coming in for epoch 600
    Coming in for epoch 601
    Coming in for epoch 602
    Coming in for epoch 603
    Coming in for epoch 604
    Coming in for epoch 605
    Coming in for epoch 606
    Coming in for epoch 607
    Coming in for epoch 608
    Coming in for epoch 609
    Coming in for epoch 610
    Coming in for epoch 611
    Coming in for epoch 612
    Coming in for epoch 613
    Coming in for epoch 614
    Coming in for epoch 615
    Coming in for epoch 616
    Coming in for epoch 617
    Coming in for epoch 618
    Coming in for epoch 619
    Coming in for epoch 620
    Coming in for epoch 621
    Coming in for epoch 622
    Coming in for epoch 623
    Coming in for epoch 624
    Coming in for epoch 625
    Coming in for epoch 626
    Coming in for epoch 627
    Coming in for epoch 628
    Coming in for epoch 629
    Coming in for epoch 630
    Coming in for epoch 631
    Coming in for epoch 632
    Coming in for epoch 633
    Coming in for epoch 634
    Coming in for epoch 635
    Coming in for epoch 636
    Coming in for epoch 637
    Coming in for epoch 638
    Coming in for epoch 639
    Coming in for epoch 640
    Coming in for epoch 641
    Coming in for epoch 642
    Coming in for epoch 643
    Coming in for epoch 644
    Coming in for epoch 645
    Coming in for epoch 646
    Coming in for epoch 647
    Coming in for epoch 648
    Coming in for epoch 649
    Coming in for epoch 650
    Coming in for epoch 651
    Coming in for epoch 652
    Coming in for epoch 653
    Coming in for epoch 654
    Coming in for epoch 655
    Coming in for epoch 656
    Coming in for epoch 657
    Coming in for epoch 658
    Coming in for epoch 659
    Coming in for epoch 660
    Coming in for epoch 661
    Coming in for epoch 662
    Coming in for epoch 663
    Coming in for epoch 664
    Coming in for epoch 665
    Coming in for epoch 666
    Coming in for epoch 667
    Coming in for epoch 668
    Coming in for epoch 669
    Coming in for epoch 670
    Coming in for epoch 671
    Coming in for epoch 672
    Coming in for epoch 673
    Coming in for epoch 674
    Coming in for epoch 675
    Coming in for epoch 676
    Coming in for epoch 677
    Coming in for epoch 678
    Coming in for epoch 679
    Coming in for epoch 680
    Coming in for epoch 681
    Coming in for epoch 682
    Coming in for epoch 683
    Coming in for epoch 684
    Coming in for epoch 685
    Coming in for epoch 686
    Coming in for epoch 687
    Coming in for epoch 688
    Coming in for epoch 689
    Coming in for epoch 690
    Coming in for epoch 691
    Coming in for epoch 692
    Coming in for epoch 693
    Coming in for epoch 694
    Coming in for epoch 695
    Coming in for epoch 696
    Coming in for epoch 697
    Coming in for epoch 698
    Coming in for epoch 699
    Coming in for epoch 700
    Coming in for epoch 701
    Coming in for epoch 702
    Coming in for epoch 703
    Coming in for epoch 704
    Coming in for epoch 705
    Coming in for epoch 706
    Coming in for epoch 707
    Coming in for epoch 708
    Coming in for epoch 709
    Coming in for epoch 710
    Coming in for epoch 711
    Coming in for epoch 712
    Coming in for epoch 713
    Coming in for epoch 714
    Coming in for epoch 715
    Coming in for epoch 716
    Coming in for epoch 717
    Coming in for epoch 718
    Coming in for epoch 719
    Coming in for epoch 720
    Coming in for epoch 721
    Coming in for epoch 722
    Coming in for epoch 723
    Coming in for epoch 724
    Coming in for epoch 725
    Coming in for epoch 726
    Coming in for epoch 727
    Coming in for epoch 728
    Coming in for epoch 729
    Coming in for epoch 730
    Coming in for epoch 731
    Coming in for epoch 732
    Coming in for epoch 733
    Coming in for epoch 734
    Coming in for epoch 735
    Coming in for epoch 736
    Coming in for epoch 737
    Coming in for epoch 738
    Coming in for epoch 739
    Coming in for epoch 740
    Coming in for epoch 741
    Coming in for epoch 742
    Coming in for epoch 743
    Coming in for epoch 744
    Coming in for epoch 745
    Coming in for epoch 746
    Coming in for epoch 747
    Coming in for epoch 748
    Coming in for epoch 749
    Coming in for epoch 750
    Coming in for epoch 751
    Coming in for epoch 752
    Coming in for epoch 753
    Coming in for epoch 754
    Coming in for epoch 755
    Coming in for epoch 756
    Coming in for epoch 757
    Coming in for epoch 758
    Coming in for epoch 759
    Coming in for epoch 760
    Coming in for epoch 761
    Coming in for epoch 762
    Coming in for epoch 763
    Coming in for epoch 764
    Coming in for epoch 765
    Coming in for epoch 766
    Coming in for epoch 767
    Coming in for epoch 768
    Coming in for epoch 769
    Coming in for epoch 770
    Coming in for epoch 771
    Coming in for epoch 772
    Coming in for epoch 773
    Coming in for epoch 774
    Coming in for epoch 775
    Coming in for epoch 776
    Coming in for epoch 777
    Coming in for epoch 778
    Coming in for epoch 779
    Coming in for epoch 780
    Coming in for epoch 781
    Coming in for epoch 782
    Coming in for epoch 783
    Coming in for epoch 784
    Coming in for epoch 785
    Coming in for epoch 786
    Coming in for epoch 787
    Coming in for epoch 788
    Coming in for epoch 789
    Coming in for epoch 790
    Coming in for epoch 791
    Coming in for epoch 792
    Coming in for epoch 793
    Coming in for epoch 794
    Coming in for epoch 795
    Coming in for epoch 796
    Coming in for epoch 797
    Coming in for epoch 798
    Coming in for epoch 799
    Coming in for epoch 800
    Coming in for epoch 801
    Coming in for epoch 802
    Coming in for epoch 803
    Coming in for epoch 804
    Coming in for epoch 805
    Coming in for epoch 806
    Coming in for epoch 807
    Coming in for epoch 808
    Coming in for epoch 809
    Coming in for epoch 810
    Coming in for epoch 811
    Coming in for epoch 812
    Coming in for epoch 813
    Coming in for epoch 814
    Coming in for epoch 815
    Coming in for epoch 816
    Coming in for epoch 817
    Coming in for epoch 818
    Coming in for epoch 819
    Coming in for epoch 820
    Coming in for epoch 821
    Coming in for epoch 822
    Coming in for epoch 823
    Coming in for epoch 824
    Coming in for epoch 825
    Coming in for epoch 826
    Coming in for epoch 827
    Coming in for epoch 828
    Coming in for epoch 829
    Coming in for epoch 830
    Coming in for epoch 831
    Coming in for epoch 832
    Coming in for epoch 833
    Coming in for epoch 834
    Coming in for epoch 835
    Coming in for epoch 836
    Coming in for epoch 837
    Coming in for epoch 838
    Coming in for epoch 839
    Coming in for epoch 840
    Coming in for epoch 841
    Coming in for epoch 842
    Coming in for epoch 843
    Coming in for epoch 844
    Coming in for epoch 845
    Coming in for epoch 846
    Coming in for epoch 847
    Coming in for epoch 848
    Coming in for epoch 849
    Coming in for epoch 850
    Coming in for epoch 851
    Coming in for epoch 852
    Coming in for epoch 853
    Coming in for epoch 854
    Coming in for epoch 855
    Coming in for epoch 856
    Coming in for epoch 857
    Coming in for epoch 858
    Coming in for epoch 859
    Coming in for epoch 860
    Coming in for epoch 861
    Coming in for epoch 862
    Coming in for epoch 863
    Coming in for epoch 864
    Coming in for epoch 865
    Coming in for epoch 866
    Coming in for epoch 867
    Coming in for epoch 868
    Coming in for epoch 869
    Coming in for epoch 870
    Coming in for epoch 871
    Coming in for epoch 872
    Coming in for epoch 873
    Coming in for epoch 874
    Coming in for epoch 875
    Coming in for epoch 876
    Coming in for epoch 877
    Coming in for epoch 878
    Coming in for epoch 879
    Coming in for epoch 880
    Coming in for epoch 881
    Coming in for epoch 882
    Coming in for epoch 883
    Coming in for epoch 884
    Coming in for epoch 885
    Coming in for epoch 886
    Coming in for epoch 887
    Coming in for epoch 888
    Coming in for epoch 889
    Coming in for epoch 890
    Coming in for epoch 891
    Coming in for epoch 892
    Coming in for epoch 893
    Coming in for epoch 894
    Coming in for epoch 895
    Coming in for epoch 896
    Coming in for epoch 897
    Coming in for epoch 898
    Coming in for epoch 899
    Coming in for epoch 900
    Coming in for epoch 901
    Coming in for epoch 902
    Coming in for epoch 903
    Coming in for epoch 904
    Coming in for epoch 905
    Coming in for epoch 906
    Coming in for epoch 907
    Coming in for epoch 908
    Coming in for epoch 909
    Coming in for epoch 910
    Coming in for epoch 911
    Coming in for epoch 912
    Coming in for epoch 913
    Coming in for epoch 914
    Coming in for epoch 915
    Coming in for epoch 916
    Coming in for epoch 917
    Coming in for epoch 918
    Coming in for epoch 919
    Coming in for epoch 920
    Coming in for epoch 921
    Coming in for epoch 922
    Coming in for epoch 923
    Coming in for epoch 924
    Coming in for epoch 925
    Coming in for epoch 926
    Coming in for epoch 927
    Coming in for epoch 928
    Coming in for epoch 929
    Coming in for epoch 930
    Coming in for epoch 931
    Coming in for epoch 932
    Coming in for epoch 933
    Coming in for epoch 934
    Coming in for epoch 935
    Coming in for epoch 936
    Coming in for epoch 937
    Coming in for epoch 938
    Coming in for epoch 939
    Coming in for epoch 940
    Coming in for epoch 941
    Coming in for epoch 942
    Coming in for epoch 943
    Coming in for epoch 944
    Coming in for epoch 945
    Coming in for epoch 946
    Coming in for epoch 947
    Coming in for epoch 948
    Coming in for epoch 949
    Coming in for epoch 950
    Coming in for epoch 951
    Coming in for epoch 952
    Coming in for epoch 953
    Coming in for epoch 954
    Coming in for epoch 955
    Coming in for epoch 956
    Coming in for epoch 957
    Coming in for epoch 958
    Coming in for epoch 959
    Coming in for epoch 960
    Coming in for epoch 961
    Coming in for epoch 962
    Coming in for epoch 963
    Coming in for epoch 964
    Coming in for epoch 965
    Coming in for epoch 966
    Coming in for epoch 967
    Coming in for epoch 968
    Coming in for epoch 969
    Coming in for epoch 970
    Coming in for epoch 971
    Coming in for epoch 972
    Coming in for epoch 973
    Coming in for epoch 974
    Coming in for epoch 975
    Coming in for epoch 976
    Coming in for epoch 977
    Coming in for epoch 978
    Coming in for epoch 979
    Coming in for epoch 980
    Coming in for epoch 981
    Coming in for epoch 982
    Coming in for epoch 983
    Coming in for epoch 984
    Coming in for epoch 985
    Coming in for epoch 986
    Coming in for epoch 987
    Coming in for epoch 988
    Coming in for epoch 989
    Coming in for epoch 990
    Coming in for epoch 991
    Coming in for epoch 992
    Coming in for epoch 993
    Coming in for epoch 994
    Coming in for epoch 995
    Coming in for epoch 996
    Coming in for epoch 997
    Coming in for epoch 998
    Coming in for epoch 999



```python
print(perceptron.W_a)
print(perceptron.W_b)
```

    [ 0.   0.2  0.  -0.2  0. ]
    [-0.1 -0.1 -0.1  0.   0. ]


|Learning rate (lr)|Weights (A)|Bias (A)|Weights (B)|Bias (B)|
|------------------|-----------|--------|-----------|--------|
|1                 |[2.  0. -2.  0.]|[0.]|[-1. -1.  0.  0.]|[-1.0]|
|0.7               |[1.4  0.  -1.4  0. ]|[0.]|[-0.7 -0.7  0. 0.]|[-0.7]|
|0.5               |[1.  0. -1.  0.]|[0.]|[-0.5 -0.5  0. 0.]|[-0.5]|
|0.3               |[0.6  0.  -0.6  0. ]|[0.]|[-0.3 -0.3  0.   0. ]|[-0.3]|
|0.1               |[0.2  0.  -0.2  0. ]|[0.]|[-0.1 -0.1  0.   0. ]|[-0.1]|

<b>For Delta learning rule: </b>


```python
import math
```


```python
class Delta(object):
    def __init__(self, dinput_size, dlr=0.1, depochs=1000):
        self.dW_a = np.zeros(dinput_size+1)
        self.dW_b = np.zeros(dinput_size+1)
        self.depochs = depochs
        self.dlr = dlr
        
    def dactivation(self, dx):
        return 1 / (1 + math.exp(-dx))
    
    def dpredict(self, dx):
        dz1 = self.dW_a.T.dot(dx)
        dz2 = self.dW_b.T.dot(dx)
        da1 = self.dactivation(dz1)
        da2 = self.dactivation(dz2)
        return da1, da2, dz1, dz2
    
    def dfit(self, dX, dd):
        for _ in range(self.depochs):
            print("Coming in for epoch {}".format(_))
            for i in range(dd.shape[0]):
                dx = np.insert(dX[i], 0, 1)
                dy1, dy2, h1, h2 = self.dpredict(dx)
                de1 = dd[i][0] - dy1
                de2 = dd[i][1] - dy2
                self.dW_a = self.dW_a + self.dlr * de1 * dx * (math.exp(-h1))/((1+math.exp(-h1))*(1+math.exp(-h1)))
                self.dW_b = self.dW_b + self.dlr * de2 * dx * (math.exp(-h2))/((1+math.exp(-h2))*(1+math.exp(-h2)))
```


```python
dX = np.array([
[1, 1, 0, 0],[1, 0, 0, 1],[0, 0, 1, 1],[0, 1, 1, 0]
])
dd = np.array([[1, 1],[1, 0],[0, 1],[0, 0]])
delta = Delta(dinput_size=4)
delta.dfit(dX, dd)
```

    Coming in for epoch 0
    Coming in for epoch 1
    Coming in for epoch 2
    Coming in for epoch 3
    Coming in for epoch 4
    Coming in for epoch 5
    Coming in for epoch 6
    Coming in for epoch 7
    Coming in for epoch 8
    Coming in for epoch 9
    Coming in for epoch 10
    Coming in for epoch 11
    Coming in for epoch 12
    Coming in for epoch 13
    Coming in for epoch 14
    Coming in for epoch 15
    Coming in for epoch 16
    Coming in for epoch 17
    Coming in for epoch 18
    Coming in for epoch 19
    Coming in for epoch 20
    Coming in for epoch 21
    Coming in for epoch 22
    Coming in for epoch 23
    Coming in for epoch 24
    Coming in for epoch 25
    Coming in for epoch 26
    Coming in for epoch 27
    Coming in for epoch 28
    Coming in for epoch 29
    Coming in for epoch 30
    Coming in for epoch 31
    Coming in for epoch 32
    Coming in for epoch 33
    Coming in for epoch 34
    Coming in for epoch 35
    Coming in for epoch 36
    Coming in for epoch 37
    Coming in for epoch 38
    Coming in for epoch 39
    Coming in for epoch 40
    Coming in for epoch 41
    Coming in for epoch 42
    Coming in for epoch 43
    Coming in for epoch 44
    Coming in for epoch 45
    Coming in for epoch 46
    Coming in for epoch 47
    Coming in for epoch 48
    Coming in for epoch 49
    Coming in for epoch 50
    Coming in for epoch 51
    Coming in for epoch 52
    Coming in for epoch 53
    Coming in for epoch 54
    Coming in for epoch 55
    Coming in for epoch 56
    Coming in for epoch 57
    Coming in for epoch 58
    Coming in for epoch 59
    Coming in for epoch 60
    Coming in for epoch 61
    Coming in for epoch 62
    Coming in for epoch 63
    Coming in for epoch 64
    Coming in for epoch 65
    Coming in for epoch 66
    Coming in for epoch 67
    Coming in for epoch 68
    Coming in for epoch 69
    Coming in for epoch 70
    Coming in for epoch 71
    Coming in for epoch 72
    Coming in for epoch 73
    Coming in for epoch 74
    Coming in for epoch 75
    Coming in for epoch 76
    Coming in for epoch 77
    Coming in for epoch 78
    Coming in for epoch 79
    Coming in for epoch 80
    Coming in for epoch 81
    Coming in for epoch 82
    Coming in for epoch 83
    Coming in for epoch 84
    Coming in for epoch 85
    Coming in for epoch 86
    Coming in for epoch 87
    Coming in for epoch 88
    Coming in for epoch 89
    Coming in for epoch 90
    Coming in for epoch 91
    Coming in for epoch 92
    Coming in for epoch 93
    Coming in for epoch 94
    Coming in for epoch 95
    Coming in for epoch 96
    Coming in for epoch 97
    Coming in for epoch 98
    Coming in for epoch 99
    Coming in for epoch 100
    Coming in for epoch 101
    Coming in for epoch 102
    Coming in for epoch 103
    Coming in for epoch 104
    Coming in for epoch 105
    Coming in for epoch 106
    Coming in for epoch 107
    Coming in for epoch 108
    Coming in for epoch 109
    Coming in for epoch 110
    Coming in for epoch 111
    Coming in for epoch 112
    Coming in for epoch 113
    Coming in for epoch 114
    Coming in for epoch 115
    Coming in for epoch 116
    Coming in for epoch 117
    Coming in for epoch 118
    Coming in for epoch 119
    Coming in for epoch 120
    Coming in for epoch 121
    Coming in for epoch 122
    Coming in for epoch 123
    Coming in for epoch 124
    Coming in for epoch 125
    Coming in for epoch 126
    Coming in for epoch 127
    Coming in for epoch 128
    Coming in for epoch 129
    Coming in for epoch 130
    Coming in for epoch 131
    Coming in for epoch 132
    Coming in for epoch 133
    Coming in for epoch 134
    Coming in for epoch 135
    Coming in for epoch 136
    Coming in for epoch 137
    Coming in for epoch 138
    Coming in for epoch 139
    Coming in for epoch 140
    Coming in for epoch 141
    Coming in for epoch 142
    Coming in for epoch 143
    Coming in for epoch 144
    Coming in for epoch 145
    Coming in for epoch 146
    Coming in for epoch 147
    Coming in for epoch 148
    Coming in for epoch 149
    Coming in for epoch 150
    Coming in for epoch 151
    Coming in for epoch 152
    Coming in for epoch 153
    Coming in for epoch 154
    Coming in for epoch 155
    Coming in for epoch 156
    Coming in for epoch 157
    Coming in for epoch 158
    Coming in for epoch 159
    Coming in for epoch 160
    Coming in for epoch 161
    Coming in for epoch 162
    Coming in for epoch 163
    Coming in for epoch 164
    Coming in for epoch 165
    Coming in for epoch 166
    Coming in for epoch 167
    Coming in for epoch 168
    Coming in for epoch 169
    Coming in for epoch 170
    Coming in for epoch 171
    Coming in for epoch 172
    Coming in for epoch 173
    Coming in for epoch 174
    Coming in for epoch 175
    Coming in for epoch 176
    Coming in for epoch 177
    Coming in for epoch 178
    Coming in for epoch 179
    Coming in for epoch 180
    Coming in for epoch 181
    Coming in for epoch 182
    Coming in for epoch 183
    Coming in for epoch 184
    Coming in for epoch 185
    Coming in for epoch 186
    Coming in for epoch 187
    Coming in for epoch 188
    Coming in for epoch 189
    Coming in for epoch 190
    Coming in for epoch 191
    Coming in for epoch 192
    Coming in for epoch 193
    Coming in for epoch 194
    Coming in for epoch 195
    Coming in for epoch 196
    Coming in for epoch 197
    Coming in for epoch 198
    Coming in for epoch 199
    Coming in for epoch 200
    Coming in for epoch 201
    Coming in for epoch 202
    Coming in for epoch 203
    Coming in for epoch 204
    Coming in for epoch 205
    Coming in for epoch 206
    Coming in for epoch 207
    Coming in for epoch 208
    Coming in for epoch 209
    Coming in for epoch 210
    Coming in for epoch 211
    Coming in for epoch 212
    Coming in for epoch 213
    Coming in for epoch 214
    Coming in for epoch 215
    Coming in for epoch 216
    Coming in for epoch 217
    Coming in for epoch 218
    Coming in for epoch 219
    Coming in for epoch 220
    Coming in for epoch 221
    Coming in for epoch 222
    Coming in for epoch 223
    Coming in for epoch 224
    Coming in for epoch 225
    Coming in for epoch 226
    Coming in for epoch 227
    Coming in for epoch 228
    Coming in for epoch 229
    Coming in for epoch 230
    Coming in for epoch 231
    Coming in for epoch 232
    Coming in for epoch 233
    Coming in for epoch 234
    Coming in for epoch 235
    Coming in for epoch 236
    Coming in for epoch 237
    Coming in for epoch 238
    Coming in for epoch 239
    Coming in for epoch 240
    Coming in for epoch 241
    Coming in for epoch 242
    Coming in for epoch 243
    Coming in for epoch 244
    Coming in for epoch 245
    Coming in for epoch 246
    Coming in for epoch 247
    Coming in for epoch 248
    Coming in for epoch 249
    Coming in for epoch 250
    Coming in for epoch 251
    Coming in for epoch 252
    Coming in for epoch 253
    Coming in for epoch 254
    Coming in for epoch 255
    Coming in for epoch 256
    Coming in for epoch 257
    Coming in for epoch 258
    Coming in for epoch 259
    Coming in for epoch 260
    Coming in for epoch 261
    Coming in for epoch 262
    Coming in for epoch 263
    Coming in for epoch 264
    Coming in for epoch 265
    Coming in for epoch 266
    Coming in for epoch 267
    Coming in for epoch 268
    Coming in for epoch 269
    Coming in for epoch 270
    Coming in for epoch 271
    Coming in for epoch 272
    Coming in for epoch 273
    Coming in for epoch 274
    Coming in for epoch 275
    Coming in for epoch 276
    Coming in for epoch 277
    Coming in for epoch 278
    Coming in for epoch 279
    Coming in for epoch 280
    Coming in for epoch 281
    Coming in for epoch 282
    Coming in for epoch 283
    Coming in for epoch 284
    Coming in for epoch 285
    Coming in for epoch 286
    Coming in for epoch 287
    Coming in for epoch 288
    Coming in for epoch 289
    Coming in for epoch 290
    Coming in for epoch 291
    Coming in for epoch 292
    Coming in for epoch 293
    Coming in for epoch 294
    Coming in for epoch 295
    Coming in for epoch 296
    Coming in for epoch 297
    Coming in for epoch 298
    Coming in for epoch 299
    Coming in for epoch 300
    Coming in for epoch 301
    Coming in for epoch 302
    Coming in for epoch 303
    Coming in for epoch 304
    Coming in for epoch 305
    Coming in for epoch 306
    Coming in for epoch 307
    Coming in for epoch 308
    Coming in for epoch 309
    Coming in for epoch 310
    Coming in for epoch 311
    Coming in for epoch 312
    Coming in for epoch 313
    Coming in for epoch 314
    Coming in for epoch 315
    Coming in for epoch 316
    Coming in for epoch 317
    Coming in for epoch 318
    Coming in for epoch 319
    Coming in for epoch 320
    Coming in for epoch 321
    Coming in for epoch 322
    Coming in for epoch 323
    Coming in for epoch 324
    Coming in for epoch 325
    Coming in for epoch 326
    Coming in for epoch 327
    Coming in for epoch 328
    Coming in for epoch 329
    Coming in for epoch 330
    Coming in for epoch 331
    Coming in for epoch 332
    Coming in for epoch 333
    Coming in for epoch 334
    Coming in for epoch 335
    Coming in for epoch 336
    Coming in for epoch 337
    Coming in for epoch 338
    Coming in for epoch 339
    Coming in for epoch 340
    Coming in for epoch 341
    Coming in for epoch 342
    Coming in for epoch 343
    Coming in for epoch 344
    Coming in for epoch 345
    Coming in for epoch 346
    Coming in for epoch 347
    Coming in for epoch 348
    Coming in for epoch 349
    Coming in for epoch 350
    Coming in for epoch 351
    Coming in for epoch 352
    Coming in for epoch 353
    Coming in for epoch 354
    Coming in for epoch 355
    Coming in for epoch 356
    Coming in for epoch 357
    Coming in for epoch 358
    Coming in for epoch 359
    Coming in for epoch 360
    Coming in for epoch 361
    Coming in for epoch 362
    Coming in for epoch 363
    Coming in for epoch 364
    Coming in for epoch 365
    Coming in for epoch 366
    Coming in for epoch 367
    Coming in for epoch 368
    Coming in for epoch 369
    Coming in for epoch 370
    Coming in for epoch 371
    Coming in for epoch 372
    Coming in for epoch 373
    Coming in for epoch 374
    Coming in for epoch 375
    Coming in for epoch 376
    Coming in for epoch 377
    Coming in for epoch 378
    Coming in for epoch 379
    Coming in for epoch 380
    Coming in for epoch 381
    Coming in for epoch 382
    Coming in for epoch 383
    Coming in for epoch 384
    Coming in for epoch 385
    Coming in for epoch 386
    Coming in for epoch 387
    Coming in for epoch 388
    Coming in for epoch 389
    Coming in for epoch 390
    Coming in for epoch 391
    Coming in for epoch 392
    Coming in for epoch 393
    Coming in for epoch 394
    Coming in for epoch 395
    Coming in for epoch 396
    Coming in for epoch 397
    Coming in for epoch 398
    Coming in for epoch 399
    Coming in for epoch 400
    Coming in for epoch 401
    Coming in for epoch 402
    Coming in for epoch 403
    Coming in for epoch 404
    Coming in for epoch 405
    Coming in for epoch 406
    Coming in for epoch 407
    Coming in for epoch 408
    Coming in for epoch 409
    Coming in for epoch 410
    Coming in for epoch 411
    Coming in for epoch 412
    Coming in for epoch 413
    Coming in for epoch 414
    Coming in for epoch 415
    Coming in for epoch 416
    Coming in for epoch 417
    Coming in for epoch 418
    Coming in for epoch 419
    Coming in for epoch 420
    Coming in for epoch 421
    Coming in for epoch 422
    Coming in for epoch 423
    Coming in for epoch 424
    Coming in for epoch 425
    Coming in for epoch 426
    Coming in for epoch 427
    Coming in for epoch 428
    Coming in for epoch 429
    Coming in for epoch 430
    Coming in for epoch 431
    Coming in for epoch 432
    Coming in for epoch 433
    Coming in for epoch 434
    Coming in for epoch 435
    Coming in for epoch 436
    Coming in for epoch 437
    Coming in for epoch 438
    Coming in for epoch 439
    Coming in for epoch 440
    Coming in for epoch 441
    Coming in for epoch 442
    Coming in for epoch 443
    Coming in for epoch 444
    Coming in for epoch 445
    Coming in for epoch 446
    Coming in for epoch 447
    Coming in for epoch 448
    Coming in for epoch 449
    Coming in for epoch 450
    Coming in for epoch 451
    Coming in for epoch 452
    Coming in for epoch 453
    Coming in for epoch 454
    Coming in for epoch 455
    Coming in for epoch 456
    Coming in for epoch 457
    Coming in for epoch 458
    Coming in for epoch 459
    Coming in for epoch 460
    Coming in for epoch 461
    Coming in for epoch 462
    Coming in for epoch 463
    Coming in for epoch 464
    Coming in for epoch 465
    Coming in for epoch 466
    Coming in for epoch 467
    Coming in for epoch 468
    Coming in for epoch 469
    Coming in for epoch 470
    Coming in for epoch 471
    Coming in for epoch 472
    Coming in for epoch 473
    Coming in for epoch 474
    Coming in for epoch 475
    Coming in for epoch 476
    Coming in for epoch 477
    Coming in for epoch 478
    Coming in for epoch 479
    Coming in for epoch 480
    Coming in for epoch 481
    Coming in for epoch 482
    Coming in for epoch 483
    Coming in for epoch 484
    Coming in for epoch 485
    Coming in for epoch 486
    Coming in for epoch 487
    Coming in for epoch 488
    Coming in for epoch 489
    Coming in for epoch 490
    Coming in for epoch 491
    Coming in for epoch 492
    Coming in for epoch 493
    Coming in for epoch 494
    Coming in for epoch 495
    Coming in for epoch 496
    Coming in for epoch 497
    Coming in for epoch 498
    Coming in for epoch 499
    Coming in for epoch 500
    Coming in for epoch 501
    Coming in for epoch 502
    Coming in for epoch 503
    Coming in for epoch 504
    Coming in for epoch 505
    Coming in for epoch 506
    Coming in for epoch 507
    Coming in for epoch 508
    Coming in for epoch 509
    Coming in for epoch 510
    Coming in for epoch 511
    Coming in for epoch 512
    Coming in for epoch 513
    Coming in for epoch 514
    Coming in for epoch 515
    Coming in for epoch 516
    Coming in for epoch 517
    Coming in for epoch 518
    Coming in for epoch 519
    Coming in for epoch 520
    Coming in for epoch 521
    Coming in for epoch 522
    Coming in for epoch 523
    Coming in for epoch 524
    Coming in for epoch 525
    Coming in for epoch 526
    Coming in for epoch 527
    Coming in for epoch 528
    Coming in for epoch 529
    Coming in for epoch 530
    Coming in for epoch 531
    Coming in for epoch 532
    Coming in for epoch 533
    Coming in for epoch 534
    Coming in for epoch 535
    Coming in for epoch 536
    Coming in for epoch 537
    Coming in for epoch 538
    Coming in for epoch 539
    Coming in for epoch 540
    Coming in for epoch 541
    Coming in for epoch 542
    Coming in for epoch 543
    Coming in for epoch 544
    Coming in for epoch 545
    Coming in for epoch 546
    Coming in for epoch 547
    Coming in for epoch 548
    Coming in for epoch 549
    Coming in for epoch 550
    Coming in for epoch 551
    Coming in for epoch 552
    Coming in for epoch 553
    Coming in for epoch 554
    Coming in for epoch 555
    Coming in for epoch 556
    Coming in for epoch 557
    Coming in for epoch 558
    Coming in for epoch 559
    Coming in for epoch 560
    Coming in for epoch 561
    Coming in for epoch 562
    Coming in for epoch 563
    Coming in for epoch 564
    Coming in for epoch 565
    Coming in for epoch 566
    Coming in for epoch 567
    Coming in for epoch 568
    Coming in for epoch 569
    Coming in for epoch 570
    Coming in for epoch 571
    Coming in for epoch 572
    Coming in for epoch 573
    Coming in for epoch 574
    Coming in for epoch 575
    Coming in for epoch 576
    Coming in for epoch 577
    Coming in for epoch 578
    Coming in for epoch 579
    Coming in for epoch 580
    Coming in for epoch 581
    Coming in for epoch 582
    Coming in for epoch 583
    Coming in for epoch 584
    Coming in for epoch 585
    Coming in for epoch 586
    Coming in for epoch 587
    Coming in for epoch 588
    Coming in for epoch 589
    Coming in for epoch 590
    Coming in for epoch 591
    Coming in for epoch 592
    Coming in for epoch 593
    Coming in for epoch 594
    Coming in for epoch 595
    Coming in for epoch 596
    Coming in for epoch 597
    Coming in for epoch 598
    Coming in for epoch 599
    Coming in for epoch 600
    Coming in for epoch 601
    Coming in for epoch 602
    Coming in for epoch 603
    Coming in for epoch 604
    Coming in for epoch 605
    Coming in for epoch 606
    Coming in for epoch 607
    Coming in for epoch 608
    Coming in for epoch 609
    Coming in for epoch 610
    Coming in for epoch 611
    Coming in for epoch 612
    Coming in for epoch 613
    Coming in for epoch 614
    Coming in for epoch 615
    Coming in for epoch 616
    Coming in for epoch 617
    Coming in for epoch 618
    Coming in for epoch 619
    Coming in for epoch 620
    Coming in for epoch 621
    Coming in for epoch 622
    Coming in for epoch 623
    Coming in for epoch 624
    Coming in for epoch 625
    Coming in for epoch 626
    Coming in for epoch 627
    Coming in for epoch 628
    Coming in for epoch 629
    Coming in for epoch 630
    Coming in for epoch 631
    Coming in for epoch 632
    Coming in for epoch 633
    Coming in for epoch 634
    Coming in for epoch 635
    Coming in for epoch 636
    Coming in for epoch 637
    Coming in for epoch 638
    Coming in for epoch 639
    Coming in for epoch 640
    Coming in for epoch 641
    Coming in for epoch 642
    Coming in for epoch 643
    Coming in for epoch 644
    Coming in for epoch 645
    Coming in for epoch 646
    Coming in for epoch 647
    Coming in for epoch 648
    Coming in for epoch 649
    Coming in for epoch 650
    Coming in for epoch 651
    Coming in for epoch 652
    Coming in for epoch 653
    Coming in for epoch 654
    Coming in for epoch 655
    Coming in for epoch 656
    Coming in for epoch 657
    Coming in for epoch 658
    Coming in for epoch 659
    Coming in for epoch 660
    Coming in for epoch 661
    Coming in for epoch 662
    Coming in for epoch 663
    Coming in for epoch 664
    Coming in for epoch 665
    Coming in for epoch 666
    Coming in for epoch 667
    Coming in for epoch 668
    Coming in for epoch 669
    Coming in for epoch 670
    Coming in for epoch 671
    Coming in for epoch 672
    Coming in for epoch 673
    Coming in for epoch 674
    Coming in for epoch 675
    Coming in for epoch 676
    Coming in for epoch 677
    Coming in for epoch 678
    Coming in for epoch 679
    Coming in for epoch 680
    Coming in for epoch 681
    Coming in for epoch 682
    Coming in for epoch 683
    Coming in for epoch 684
    Coming in for epoch 685
    Coming in for epoch 686
    Coming in for epoch 687
    Coming in for epoch 688
    Coming in for epoch 689
    Coming in for epoch 690
    Coming in for epoch 691
    Coming in for epoch 692
    Coming in for epoch 693
    Coming in for epoch 694
    Coming in for epoch 695
    Coming in for epoch 696
    Coming in for epoch 697
    Coming in for epoch 698
    Coming in for epoch 699
    Coming in for epoch 700
    Coming in for epoch 701
    Coming in for epoch 702
    Coming in for epoch 703
    Coming in for epoch 704
    Coming in for epoch 705
    Coming in for epoch 706
    Coming in for epoch 707
    Coming in for epoch 708
    Coming in for epoch 709
    Coming in for epoch 710
    Coming in for epoch 711
    Coming in for epoch 712
    Coming in for epoch 713
    Coming in for epoch 714
    Coming in for epoch 715
    Coming in for epoch 716
    Coming in for epoch 717
    Coming in for epoch 718
    Coming in for epoch 719
    Coming in for epoch 720
    Coming in for epoch 721
    Coming in for epoch 722
    Coming in for epoch 723
    Coming in for epoch 724
    Coming in for epoch 725
    Coming in for epoch 726
    Coming in for epoch 727
    Coming in for epoch 728
    Coming in for epoch 729
    Coming in for epoch 730
    Coming in for epoch 731
    Coming in for epoch 732
    Coming in for epoch 733
    Coming in for epoch 734
    Coming in for epoch 735
    Coming in for epoch 736
    Coming in for epoch 737
    Coming in for epoch 738
    Coming in for epoch 739
    Coming in for epoch 740
    Coming in for epoch 741
    Coming in for epoch 742
    Coming in for epoch 743
    Coming in for epoch 744
    Coming in for epoch 745
    Coming in for epoch 746
    Coming in for epoch 747
    Coming in for epoch 748
    Coming in for epoch 749
    Coming in for epoch 750
    Coming in for epoch 751
    Coming in for epoch 752
    Coming in for epoch 753
    Coming in for epoch 754
    Coming in for epoch 755
    Coming in for epoch 756
    Coming in for epoch 757
    Coming in for epoch 758
    Coming in for epoch 759
    Coming in for epoch 760
    Coming in for epoch 761
    Coming in for epoch 762
    Coming in for epoch 763
    Coming in for epoch 764
    Coming in for epoch 765
    Coming in for epoch 766
    Coming in for epoch 767
    Coming in for epoch 768
    Coming in for epoch 769
    Coming in for epoch 770
    Coming in for epoch 771
    Coming in for epoch 772
    Coming in for epoch 773
    Coming in for epoch 774
    Coming in for epoch 775
    Coming in for epoch 776
    Coming in for epoch 777
    Coming in for epoch 778
    Coming in for epoch 779
    Coming in for epoch 780
    Coming in for epoch 781
    Coming in for epoch 782
    Coming in for epoch 783
    Coming in for epoch 784
    Coming in for epoch 785
    Coming in for epoch 786
    Coming in for epoch 787
    Coming in for epoch 788
    Coming in for epoch 789
    Coming in for epoch 790
    Coming in for epoch 791
    Coming in for epoch 792
    Coming in for epoch 793
    Coming in for epoch 794
    Coming in for epoch 795
    Coming in for epoch 796
    Coming in for epoch 797
    Coming in for epoch 798
    Coming in for epoch 799
    Coming in for epoch 800
    Coming in for epoch 801
    Coming in for epoch 802
    Coming in for epoch 803
    Coming in for epoch 804
    Coming in for epoch 805
    Coming in for epoch 806
    Coming in for epoch 807
    Coming in for epoch 808
    Coming in for epoch 809
    Coming in for epoch 810
    Coming in for epoch 811
    Coming in for epoch 812
    Coming in for epoch 813
    Coming in for epoch 814
    Coming in for epoch 815
    Coming in for epoch 816
    Coming in for epoch 817
    Coming in for epoch 818
    Coming in for epoch 819
    Coming in for epoch 820
    Coming in for epoch 821
    Coming in for epoch 822
    Coming in for epoch 823
    Coming in for epoch 824
    Coming in for epoch 825
    Coming in for epoch 826
    Coming in for epoch 827
    Coming in for epoch 828
    Coming in for epoch 829
    Coming in for epoch 830
    Coming in for epoch 831
    Coming in for epoch 832
    Coming in for epoch 833
    Coming in for epoch 834
    Coming in for epoch 835
    Coming in for epoch 836
    Coming in for epoch 837
    Coming in for epoch 838
    Coming in for epoch 839
    Coming in for epoch 840
    Coming in for epoch 841
    Coming in for epoch 842
    Coming in for epoch 843
    Coming in for epoch 844
    Coming in for epoch 845
    Coming in for epoch 846
    Coming in for epoch 847
    Coming in for epoch 848
    Coming in for epoch 849
    Coming in for epoch 850
    Coming in for epoch 851
    Coming in for epoch 852
    Coming in for epoch 853
    Coming in for epoch 854
    Coming in for epoch 855
    Coming in for epoch 856
    Coming in for epoch 857
    Coming in for epoch 858
    Coming in for epoch 859
    Coming in for epoch 860
    Coming in for epoch 861
    Coming in for epoch 862
    Coming in for epoch 863
    Coming in for epoch 864
    Coming in for epoch 865
    Coming in for epoch 866
    Coming in for epoch 867
    Coming in for epoch 868
    Coming in for epoch 869
    Coming in for epoch 870
    Coming in for epoch 871
    Coming in for epoch 872
    Coming in for epoch 873
    Coming in for epoch 874
    Coming in for epoch 875
    Coming in for epoch 876
    Coming in for epoch 877
    Coming in for epoch 878
    Coming in for epoch 879
    Coming in for epoch 880
    Coming in for epoch 881
    Coming in for epoch 882
    Coming in for epoch 883
    Coming in for epoch 884
    Coming in for epoch 885
    Coming in for epoch 886
    Coming in for epoch 887
    Coming in for epoch 888
    Coming in for epoch 889
    Coming in for epoch 890
    Coming in for epoch 891
    Coming in for epoch 892
    Coming in for epoch 893
    Coming in for epoch 894
    Coming in for epoch 895
    Coming in for epoch 896
    Coming in for epoch 897
    Coming in for epoch 898
    Coming in for epoch 899
    Coming in for epoch 900
    Coming in for epoch 901
    Coming in for epoch 902
    Coming in for epoch 903
    Coming in for epoch 904
    Coming in for epoch 905
    Coming in for epoch 906
    Coming in for epoch 907
    Coming in for epoch 908
    Coming in for epoch 909
    Coming in for epoch 910
    Coming in for epoch 911
    Coming in for epoch 912
    Coming in for epoch 913
    Coming in for epoch 914
    Coming in for epoch 915
    Coming in for epoch 916
    Coming in for epoch 917
    Coming in for epoch 918
    Coming in for epoch 919
    Coming in for epoch 920
    Coming in for epoch 921
    Coming in for epoch 922
    Coming in for epoch 923
    Coming in for epoch 924
    Coming in for epoch 925
    Coming in for epoch 926
    Coming in for epoch 927
    Coming in for epoch 928
    Coming in for epoch 929
    Coming in for epoch 930
    Coming in for epoch 931
    Coming in for epoch 932
    Coming in for epoch 933
    Coming in for epoch 934
    Coming in for epoch 935
    Coming in for epoch 936
    Coming in for epoch 937
    Coming in for epoch 938
    Coming in for epoch 939
    Coming in for epoch 940
    Coming in for epoch 941
    Coming in for epoch 942
    Coming in for epoch 943
    Coming in for epoch 944
    Coming in for epoch 945
    Coming in for epoch 946
    Coming in for epoch 947
    Coming in for epoch 948
    Coming in for epoch 949
    Coming in for epoch 950
    Coming in for epoch 951
    Coming in for epoch 952
    Coming in for epoch 953
    Coming in for epoch 954
    Coming in for epoch 955
    Coming in for epoch 956
    Coming in for epoch 957
    Coming in for epoch 958
    Coming in for epoch 959
    Coming in for epoch 960
    Coming in for epoch 961
    Coming in for epoch 962
    Coming in for epoch 963
    Coming in for epoch 964
    Coming in for epoch 965
    Coming in for epoch 966
    Coming in for epoch 967
    Coming in for epoch 968
    Coming in for epoch 969
    Coming in for epoch 970
    Coming in for epoch 971
    Coming in for epoch 972
    Coming in for epoch 973
    Coming in for epoch 974
    Coming in for epoch 975
    Coming in for epoch 976
    Coming in for epoch 977
    Coming in for epoch 978
    Coming in for epoch 979
    Coming in for epoch 980
    Coming in for epoch 981
    Coming in for epoch 982
    Coming in for epoch 983
    Coming in for epoch 984
    Coming in for epoch 985
    Coming in for epoch 986
    Coming in for epoch 987
    Coming in for epoch 988
    Coming in for epoch 989
    Coming in for epoch 990
    Coming in for epoch 991
    Coming in for epoch 992
    Coming in for epoch 993
    Coming in for epoch 994
    Coming in for epoch 995
    Coming in for epoch 996
    Coming in for epoch 997
    Coming in for epoch 998
    Coming in for epoch 999



```python
print(delta.dW_a)
print(delta.dW_b)
```

    [-2.93099017e-04  2.83050749e+00  9.56203098e-04 -2.83080059e+00
     -1.24930211e-03]
    [-0.00630858 -0.00315429 -0.00946284 -0.00315429  0.00315426]


|Learning rate (lr)|Weights (A)|Bias (A)|Weights (B)|Bias (B)|
|------------------|-----------|--------|-----------|--------|
|1                 |[4.09940513e+00,  1.50935779e-03, -4.09966701e+00, -1.77123527e-03]|[-2.61877479e-04]|[-0.0340762, -0.1022286, -0.0340762,  0.0340762]|[-0.0681524]|
|0.7|[3.91075692e+00,  1.42039822e-03, -3.91102156e+00, -1.68503484e-03]|[-2.64636618e-04]|[-0.02328688, -0.06986065, -0.02328688, 0.02328688]|[-0.04657377]|
|0.5|[3.73086876e+00, 1.33879709e-03, -3.73113651e+00, -1.60655388e-03]|[-2.67756784e-04]|[-0.01635148, -0.04905445, -0.01635148,  0.01635148]|[-0.03270297]|
|0.3|[3.45331815e+00,  1.21744666e-03, -3.45359183e+00, -1.49113116e-03]|[-2.73684504e-04]|[-0.00963793, -0.0289138,  -0.00963793,  0.00963793]|[-0.01927586]|
|0.1|[2.83050749e+00,  9.56203098e-04, -2.83080059e+00, -1.24930211e-03]]|[-2.93099017e-04]|[-0.00315429, -0.00946284, -0.00315429,  0.00315426]|[-0.00630858]|


```python

```

94a661e11016c5998c79ba2b446a95f10cacaa0c
ipynb
Jupyter Notebook
Feed Forward Neural Network.ipynb
yog3shmandg3/CS6210-Advance-Machine-Learning
f533994365c04fbeda81b840ed6400ecb24de681
MIT
Feed Forward Neural Network.ipynb
yog3shmandg3/CS6210-Advance-Machine-Learning
f533994365c04fbeda81b840ed6400ecb24de681
MIT
Feed Forward Neural Network.ipynb
yog3shmandg3/CS6210-Advance-Machine-Learning
f533994365c04fbeda81b840ed6400ecb24de681
MIT
Qwen/Qwen-72B
1. YES
2. YES