I have written the following code

def initialize_parameters_he(layers_dims):

“”"

Arguments:

layer_dims – python array (list) containing the size of each layer.

```
Returns:
parameters -- python dictionary containing your parameters "W1", "b1", ..., "WL", "bL":
W1 -- weight matrix of shape (layers_dims[1], layers_dims[0])
b1 -- bias vector of shape (layers_dims[1], 1)
...
WL -- weight matrix of shape (layers_dims[L], layers_dims[L-1])
bL -- bias vector of shape (layers_dims[L], 1)
"""
np.random.seed(3)
parameters = {}
L = len(layers_dims) - 1 # integer representing the number of layers
for l in range(1, L + 1):
#(≈ 2 lines of code)
# parameters['W' + str(l)] =
# parameters['b' + str(l)] =
# YOUR CODE STARTS HERE
parameters['W' + str(l)] = np.random.randn((layers_dims[l],layers_dims[l-1]))*np.sqrt(2/layers_dim[l-1])
parameters['b' + str(l)] = np.zeros((layers_dims[l],1))
# YOUR CODE ENDS HERE
return parameters
```

My error is

mtrand.pyx in numpy.random.mtrand.RandomState.randn()

mtrand.pyx in numpy.random.mtrand.RandomState.standard_normal()

_common.pyx in numpy.random._common.cont()

TypeError: ‘tuple’ object cannot be interpreted as an integer