nextthe initialize method generates random initial weight matrices and bias vecl tors {wl bl } = specificallyall parameters are initialized with values distributed according to the standard normal distribution def initialize (pw_sig )wb [[]]len( )[[]]len(pfor in range ( len( )) [ ]w_sig np random randn ( [ ] [ - ] [ ]w_sig np random randn ( [ ] return , , initialize (pinitialize weight matrices and bias vectors the following code implements the relu activation function from figure and the squared error loss note that these functions return both the function values and the corresponding gradients def relu( , )relu activation function value and derivative if =lreturn znp ones_like (zelseval np maximum ( ,zrelu function element -wise np array ( > dtype float derivative of relu element -wise return val def loss_fn ( , )return ( )** ( ys relu nextwe implement the feed-forward and backward-propagation algorithm herewe have implemented algorithm inside the backward-propagation loop def feedforward ( , , )azgr_s [ ]* + [ ]* + [ ]* + [ reshape - , for in range ( , + ) [lw[la[ - [laffine transformation [ ]gr_s[ls( [ ],lactivation function return azgr_s def backward ( , , , ) =len(ydelta [ ]* + dc_db dc_dw [ ]* + [ ]* + loss = for in range ( )loop over training examples azgr_s feedforward ( [ ,:twbcost gr_c loss_fn ( [ ] [ ]cost and gradient wrt loss +cost/