티스토리 뷰
Deep Learning/PyTorch
[PyTorch] Get a single batch from DataLoader without iterating
developer0hye 2021. 1. 24. 17:30github.com/pytorch/pytorch/issues/1917
Get a single batch from DataLoader without iterating · Issue #1917 · pytorch/pytorch
Is it possible to get a single batch from a DataLoader? Currently, I setup a for loop and return a batch manually. If there isn't a way to do this with the DataLoader currently, I would be happ...
github.com
dataloader_iterator = iter(dataloader)
for i in range(iterations):
try:
data, target = next(dataloader_iterator)
except StopIteration:
dataloader_iterator = iter(dataloader)
data, target = next(dataloader_iterator)
do_something()
'Deep Learning > PyTorch' 카테고리의 다른 글
[PyTorch] torch.set_deterministic(True) 에러가 떠요! (0) | 2021.01.28 |
---|---|
[PyTorch] auto mixed precision(amp) 사용시 주의할 점 (0) | 2021.01.27 |
[PyTorch] torch.exp 와 auto mixed precision (0) | 2021.01.19 |
[PyTorch] Depthwise Convolutional Layer 속도 향상 방법 (0) | 2021.01.08 |
Image(Numpy, Opencv) To Tensor (0) | 2020.12.22 |
댓글
공지사항
최근에 올라온 글
최근에 달린 댓글
- Total
- Today
- Yesterday
링크
TAG
- 조합
- LCA
- 가장 긴 증가하는 부분 수열
- 백준 11437
- C++ Deploy
- 이분탐색
- PyCharm
- FairMOT
- 백트래킹
- cosine
- 백준 1766
- 위상 정렬 알고리즘
- 백준
- ㅂ
- 문제집
- 인공지능을 위한 선형대수
- 파이참
- MOT
- 백준 11053
- 순열
- 단축키
- Lowest Common Ancestor
- 자료구조
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | ||
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 |
글 보관함