# 菜鸟 深 学 的 逆袭 之 路 # day3

The code of this answer is * 0.01, the code of the landlord was learned later, because the parameters of the L layer must not be too large, otherwise it will enter the saturation zone and the learning rate will decrease. The L layer parameters are affected by the L-1 layer. In order to ensure that the parameters are small, they must be divided by the L-1 layer parameters, that is, the code written by the landlord.

dAL = - (np.divide (Y, AL) - np.divide (1 - Y, 1 - AL))

np.divide: This is similar to np.multiply, which means that the corresponding elements in the array are divided

for l in reversed (range (L-1)):
indicates the calculation from L-2 to L0

print ('Accuracy is:' + str (float (np.sum ((p == y)) / m)))
This function is used to calculate the value of p equal to y if and only The same y dimension and the same array

mislabeled_indices = np.asarray (np.where (a == 1))
np.where can output rows and columns that satisfy the condition value

Published 31 original articles · Likes0 · Visits 689

Guess you like

Origin blog.csdn.net/ballzy/article/details/105060685