What Is Epoch, Batch Size and Batch?

博客介绍了神经网络训练中使用Epochs和Batch Size的原因。因训练数据集大,需将其分成小份以更新神经网络权重。还给出了Epochs、Batch Size和Batch的定义,并举例说明,如2000个样本的数据集,以500为Batch Size,需4次迭代完成1个Epoch。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

1. Why Do We Use Epochs and Batch Size?

Training dataset sometimes may be very large for the computers to deal with, so we have to divide the dataset into smaller size to help the computers update the weights of the neural networks each time. That is why we use epochs and batch size.

2. Epochs

Definition: One Epoch is when an ENTIRE dataset is passed forward and backward through the neural network only ONCE.

The number or Epoch gives no clear conclusions because datasets and the diversity of them are different.

3. Batch Size

Definition: Total number of training examples present in a single batch.

NOTE: Batch Size and Number or batches are two different definitions.

4. Batch

Definition: Batch is the number that you devide your all data into several parts.

5. Example

We can divide the dataset of 2000 examples into batches of 500 then it will take 4 iterations to complete 1 epoch.

Batch Size: 500

Itertaion: 4

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值