Cost function without regularization
Sigmoid gradient function done!