# 菜鸟 深 学习 的 逆袭 # day2

np.random.seed (1) Meaning:
seed () is used to specify the integer value of the algorithm used when generating the random number. If the same seed () value is used, the random number generated each time is the same.
The parameters in parentheses here can be understood as a heap, with 1 representing the first heap and two representing the second heap.
np.random.seed (1)
a = np.random.random ()
print (a)
The output of a here is 0.417022004702574
If I want to use this random number next time, I need to do it again
np.random.seed (1 )
b = np.random.random ()
assert a == b

What is the difference between randn and rand?

for i, n_h in enumerate (hidden_layer_sizes):
similar to the ordinary for loop, but it outputs the serial number i and sequence value at the same time
as follows
0 hidden_layer_sizes [0]
1 hidden_layer_sizes [1]
2 hidden_layer_sizes [2]…

print ('Number of nodes in hidden layer: {}, accuracy rate: {}%'. format (n_h, accuracy)) output value
format instead of {}

subplot (numRows, numCols, plotNum)
subploty has three parameters, the first two are to create a few rows and columns, the third is the current one

Published 31 original articles · praised 0 · visits 690

Guess you like

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