第二周:神经网络基础课堂笔记

2.7计算图

 2.8计算图的导数计算

 

 2.9 logistic回归中的梯度下降法

 2.10 m个样本的梯度下降

 

2.11向量化比for循环可以节省大量的时间,运行速度会更快

2.12 向量化的更多例子

2.13 向量化logistic 回归

 2.15python中的广播

https://blog.csdn.net/kevindree/article/details/88379111

https://blog.csdn.net/weixin_41923658/article/details/98195678

2.16关于python_numpy向量的说明

np.random.randn()函数

语法:

np.random.randn(d0,d1,d2……dn) 
1)当函数括号内没有参数时,则返回一个浮点数; 
2)当函数括号内有一个参数时,则返回秩为1的数组,不能表示向量和矩阵; 
3)当函数括号内有两个及以上参数时,则返回对应维度的数组,能表示向量或矩阵; (如下则返回2行3列的数组)
4)np.random.standard_normal()函数与np.random.randn()类似,但是np.random.standard_normal()
的输入参数为元组(tuple). 
5)np.random.randn()的输入通常为整数,但是如果为浮点数,则会自动直接截断转换为整数。

建议使用下面的写法:

原文地址:https://www.cnblogs.com/spore/p/13027722.html