ShahariarRabby / deeplearning.ai

deeplearning.ai , By Andrew Ng, All video link
647 stars 378 forks source link

COURSE-2-Week-2 Utils Function Error #9

Closed acynothia closed 6 years ago

acynothia commented 6 years ago

From:

parameters['W' + str(l)] = np.random.randn(layer_dims[l], layer_dims[l-1])*  np.sqrt(2 / layer_dims[l-1])`

To:

parameters['W' + str(l)] = np.random.randn(layer_dims[l], layer_dims[l-1])*  np.sqrt(2. / layer_dims[l-1])

Notice: np.sqrt(2 => np.sqrt(2.

ShahariarRabby commented 6 years ago

This file is same as coursera and I didn't change anything, So I think it's better to stay same as coursera,

acynothia commented 6 years ago

Ok, Maybe, It's because of I use python2.7