1.安装
1.1 更改pip源
国内可用源
阿里云 http://mirrors.aliyun.com/pypi/simple/
中国科技大学 https://pypi.mirrors.ustc.edu.cn/simple/
豆瓣(douban) http://pypi.douban.com/simple/
清华大学 https://pypi.tuna.tsinghua.edu.cn/simple/
中国科学技术大学 http://pypi.mirrors.ustc.edu.cn/simple/
windows下更改源
在 C:\Users\XXXX
目录下创建pip文件夹,然后文件夹下创建 pip.ini
文件填写如下内容
[global]
timeout = 6000
index-url = https://pypi.tuna.tsinghua.edu.cn/simple
trusted-host = pypi.tuna.tsinghua.edu.cn
2.相关概念
2.1 梯度下降算法
1、批量梯度下降:遍历全部数据集算一次损失函数,计算量大,计算速度慢,不支持在线学习。
2、随机梯度下降(stochastic gradient descent):每处理一个数据就算一次损失函数,该方法速度快,但是收敛性不好,可能在最优点附近晃来晃去,命中不到最优点。
3、小批量梯度下降:以上两种方法的折中方法,该方法把数据分为若干批,按批来更新参数。