Closed acynothia closed 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.
This file is same as coursera and I didn't change anything, So I think it's better to stay same as coursera,
Ok, Maybe, It's because of I use python2.7
From:
To:
Notice: np.sqrt(2 => np.sqrt(2.