深度学习必知必会
deep learning,numpy,矩阵,统计
线性代数
TODO
概率统计
TODO
numpy基础
数组
- 创建数组
a = np.array([1,2,3,4],dtype=数据类型) - 查看数组维度
a.shape - 修改数组维度
a.reshape((2,-1))
zeros / ones / full / eye / random.random
np.zeros((1,2))
np.ones((1,2))
np.full((1,2),0) 和zeros等价
np.full((1,2),1)和ones等价 np.eye(3)创建单位矩阵np.random.random((3,4))` 创建随机数组
indexing 索引
数学运算
- 同维度的矩阵+ - * /
np.add(a,b)
np.subtract(a,b)
np.multiply(a,b)
np.divide(a,b)
np.sqrt(a,b)
- 矩阵运算
np.dot(a,b) - 求和,平均值
np.sum(a,axis=0)0 表示行 1 表示列
np.mean(a,axis=0) np.random.uniform(1,100)生成一个1-100的随机数np.tile(a,(2,3))将矩阵a在行和列进行复杂后返回新的矩阵a.argsort(axis=0/1)行/列排序,返回对应的索引矩阵a.T / np.transpose(a)转置