File tree 3 files changed +9
-9
lines changed
3 files changed +9
-9
lines changed Original file line number Diff line number Diff line change @@ -77,7 +77,7 @@ def cross_entropy(T, pY):
77
77
print ("Final train classification_rate:" , classification_rate (Ytrain , predict (pYtrain )))
78
78
print ("Final test classification_rate:" , classification_rate (Ytest , predict (pYtest )))
79
79
80
- legend1 , = plt .plot (train_costs , label = 'train cost' )
81
- legend2 , = plt .plot (test_costs , label = 'test cost' )
82
- plt .legend ([ legend1 , legend2 ] )
80
+ plt .plot (train_costs , label = 'train cost' )
81
+ plt .plot (test_costs , label = 'test cost' )
82
+ plt .legend ()
83
83
plt .show ()
Original file line number Diff line number Diff line change @@ -70,7 +70,7 @@ def cross_entropy(T, pY):
70
70
print ("Final train classification_rate:" , classification_rate (Ytrain , predict (pYtrain )))
71
71
print ("Final test classification_rate:" , classification_rate (Ytest , predict (pYtest )))
72
72
73
- legend1 , = plt .plot (train_costs , label = 'train cost' )
74
- legend2 , = plt .plot (test_costs , label = 'test cost' )
75
- plt .legend ([ legend1 , legend2 ] )
73
+ plt .plot (train_costs , label = 'train cost' )
74
+ plt .plot (test_costs , label = 'test cost' )
75
+ plt .legend ()
76
76
plt .show ()
Original file line number Diff line number Diff line change @@ -55,9 +55,9 @@ def cross_entropy(T, pY):
55
55
print ("Final train classification_rate:" , classification_rate (Ytrain , np .round (pYtrain )))
56
56
print ("Final test classification_rate:" , classification_rate (Ytest , np .round (pYtest )))
57
57
58
- legend1 , = plt .plot (train_costs , label = 'train cost' )
59
- legend2 , = plt .plot (test_costs , label = 'test cost' )
60
- plt .legend ([ legend1 , legend2 ] )
58
+ plt .plot (train_costs , label = 'train cost' )
59
+ plt .plot (test_costs , label = 'test cost' )
60
+ plt .legend ()
61
61
plt .show ()
62
62
63
63
You can’t perform that action at this time.
0 commit comments