File “”, line 25
seems to be an error i the assert statement

Please actually show us the full error output that you got.

Note that assigning

parameters['W' + str(l)] = 'W' + str(l)

is not a useful thing to do. Why set the value of an entry in a dictionary to the key value of that entry? You want to set that entry of the parameters dictionary to the actual value of the weight matrix W^{[l]}.

Was my mistake. All fine. Sirry