注意三者的区别,在构建神经网络时候可以避免错误
import numpy as np
C = np.random.randn(5) #产生随机的一维数组 print(C) ''' out: [ -5.65042297e-01 -5.48341047e-01 4.15160628e-04 -3.24193205e-02 -3.01925976e-01] ''' D = np.random.randn(5,1) #产生的5行1列的列向量 print(D) ''' output: [[ 0.30360266] [ 0.03575066] [-0.7923111 ] [ 0.25596523] [-0.46919003]] ''' G = np.random.randn(1,5) #产生的1行5列的行向量 print(G) ''' output: [[ 2.93917097 1.19041539 -0.65461783 0.3956 1.47609237]] '''