当前位置:网站首页>The length of pytorch dataloader the difference between epoch and iteration
The length of pytorch dataloader the difference between epoch and iteration
2022-06-28 05:49:00 【TBYourHero】
pytorch dataloader The length of
pytorch in dataloader The size of will depend on batch_size Automatic resizing of . If the training dataset has 1000 Samples , also batch_size The size is 10, be dataloader The length of 100.
It should be noted that , If dataset The size of cannot be batch_size to be divisible by , be dataloader Last of batch Maybe more than the actual batch_size smaller . for example , about 1001 Samples ,batch_size Its size is 10,train_loader The length of len(train_loader)=101, the last one batch Will contain only one sample . Can be set by dataloader Of drop_last The attribute is True To avoid this .
Pytorch Of Dataset Provides access to dataset Interface to a single sample in , By using index Subscript to get single sample data .Dataloader To provide with batch Samples for model training
epoch And iteration The difference between
iteration: 1 individual iteration Equal to using batchsize One sample training
epoch: 1 individual epoch It is equal to training once with all the samples in the training set
边栏推荐
- Zzuli:1072 frog climbing well
- 原动力×云原生正发声 降本增效大讲堂
- CSCI GA scheduling design
- jq图片放大器
- 深度学习19种损失函数
- [Linux] - using xshell to install MySQL on Linux and realize the deployment of webapp
- 解决ValueError: Iterable over raw text documents expected, string object received.
- ? How to write the position to output true
- Jenkins continuous integration 1
- 指定默认参数值 仍报错:error: the following arguments are required:
猜你喜欢
随机推荐
Cryptography notes
5G网络整体架构
Flink 窗口机制 (两次等待, 最后兜底)
What is webrtc?
容量调度绝对值配置队列使用与避坑
Line animation
电子邮件营销的优势在哪里?为什么shopline独立站卖家如此重视?
[CAD drawing Video] AutoCAD 2014 master's way
Animation de ligne
Zzuli:1071 decomposing prime factor
【无标题】
Data middle office: construction ideas and implementation experience of data governance
JSP connecting Oracle to realize login and registration
5GgNB和ng-eNB的主要功能
jq图片放大器
Data middle office: an article that takes you to understand data middle office in simple terms
Capacity scheduling absolute value configuration queue usage and pit avoidance
YYGH-7-用户管理
Data warehouse: financial / banking theme layer division scheme
Filecoin黑客松开发者大赛