Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

파이토치 데이터 공정

PyTorch 2.8.0+cu128

Oxford IIIT Pets

데이터

파일 개수: 7390
첫 번째 파일: data/oxford-iiit-pet/images/Abyssinian_1.jpg
데이터셋 크기: 7390
<class 'PIL.Image.Image'> (600, 400) RGB
<class 'torch.Tensor'> torch.Size([3, 200, 200]) torch.float32 cpu
<class 'dict'> Abyssinian_1.jpg <class 'torch.Tensor'>

Data Loader

<class 'torch.Tensor'> torch.Size([32, 3, 200, 200]) torch.float32 cpu

멀티 프로세스 로딩

torch.utils.data

도커 컨테이너를 사용하는 경우, 공유 메모리 (shm; shared memory) 크기의 기본값(64MB)이 작아서 멀티 프로세스가 실패할 수 있습니다. (도커 컨테이너 자원 제한)

호스트 공유 메모리 사용 설정을 권장합니다. (도커 컨테이너 IPC 설정)

docker run --ipc=host $IMAGE_ID
Output
멀티 프로세스 수: 0
배치 크기: 1 소요 시간 (초): 27.3
배치 크기: 8 소요 시간 (초): 27.2
배치 크기: 32 소요 시간 (초): 27.2
배치 크기: 64 소요 시간 (초): 27.5
배치 크기: 128 소요 시간 (초): 28.1
배치 크기: 256 소요 시간 (초): 28.6
배치 크기: 512 소요 시간 (초): 29.4
배치 크기: 1024 소요 시간 (초): 28.8
멀티 프로세스 수: 2
배치 크기: 1 소요 시간 (초): 15.8
배치 크기: 8 소요 시간 (초): 14.0
배치 크기: 32 소요 시간 (초): 13.8
배치 크기: 64 소요 시간 (초): 14.0
배치 크기: 128 소요 시간 (초): 14.2
배치 크기: 256 소요 시간 (초): 14.6
배치 크기: 512 소요 시간 (초): 14.7
배치 크기: 1024 소요 시간 (초): 16.4
멀티 프로세스 수: 4
배치 크기: 1 소요 시간 (초): 8.9
배치 크기: 8 소요 시간 (초): 7.8
배치 크기: 32 소요 시간 (초): 7.6
배치 크기: 64 소요 시간 (초): 7.6
배치 크기: 128 소요 시간 (초): 7.8
배치 크기: 256 소요 시간 (초): 8.4
배치 크기: 512 소요 시간 (초): 8.7
배치 크기: 1024 소요 시간 (초): 9.3
멀티 프로세스 수: 8
배치 크기: 1 소요 시간 (초): 6.6
배치 크기: 8 소요 시간 (초): 4.6
배치 크기: 32 소요 시간 (초): 4.3
배치 크기: 64 소요 시간 (초): 4.3
배치 크기: 128 소요 시간 (초): 4.7
배치 크기: 256 소요 시간 (초): 4.7
배치 크기: 512 소요 시간 (초): 5.2
배치 크기: 1024 소요 시간 (초): 5.9
Loading...