dataset

    Pytorch Dataset๊ณผ DataLoader

    ํŒŒ์ดํ† ์น˜์—์„œ ๋ฐ์ดํ„ฐ๋“ค์„ ํ•™์Šตํ•  ๋•Œ ๊ต‰์žฅํžˆ ์œ ์šฉํ•œ ๊ธฐ๋Šฅ์œผ๋กœ DataLoader๊ฐ€ ์žˆ์Šต๋‹ˆ๋‹ค. DataLoader๋Š” ํŒŒ์ดํ† ์น˜์—์„œ ๋ฐ์ดํ„ฐ๋“ค์„ ์›ํ•˜๋Š” batch size๋กœ ์ž˜๋ผ์ค๋‹ˆ๋‹ค. DataLoader๋ฅผ ์‚ฌ์šฉํ•˜๋ฉด batch size์— ๋งž์ถ”์–ด ํ•™์Šต์„ ๊ต‰์žฅํžˆ ์‰ฝ๊ฒŒ ํ•™์Šต์„ ์ˆ˜ํ–‰ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. ์ด ๋•Œ DataLoader์— ๋„ฃ์–ด์ฃผ์–ด์•ผ ํ•˜๋Š” ๊ฐ’์ด Dataset์ด ๋ฉ๋‹ˆ๋‹ค. How To Use Dataset from torchvision import datasets, transforms train_dataset = datasets.MNIST( root = "data", download = True, train = True, transform = transforms.Compose([ transforms.ToTensor() ]..