变量 | 含义 |
---|---|
epoch | 一个epoch表示所有训练样本运算学习一遍 |
iteration/step | 表示每运行一个iteration/step,更新一次参数权重,即进行一次学习,每一次更新参数需要batch size个样本进行运算学习,根据运算结果调整更新一次参数。 |
batch size | 1次迭代所使用的样本量 |
其关系为:
i
t
e
r
a
t
i
o
n
=
e
x
a
m
p
l
e
N
u
m
s
∗
e
p
o
c
h
b
a
t
c
h
s
i
z
e
iteration=\frac{exampleNums * epoch}{batch size}
iteration=batchsizeexampleNums∗epoch
举例:
假设有20000个样本,batch size 为200,epoch为1, 则
i
t
e
r
a
t
i
o
n
=
20000
∗
1
200
=
100
iteration=\frac{20000 * 1}{200}=100
iteration=20020000∗1=100