1.数组乘积
a = np.random.randn(4, 3) # a.shape = (4, 3)
b = np.random.randn(3, 2) # b.shape = (3, 2)
c = a * b
Answer:维度不同数组无法相乘
2.矩阵乘积
a = np.random.randn(12288, 150) # a.shape = (12288, 150)
b = np.random.randn(150, 45) # b.shape = (150, 45)
c = np.dot(a, b)
3.广播总结

4.矩阵&列向量声明
x = img.reshape((32 * 32 * 3, 1)) 3027*1的列向量

829

被折叠的 条评论
为什么被折叠?



