지금까지 모델 구축에 사용한 모든 데이터는 미리 훈련 세트와 테스트 세트로 분할되어 있었습
니다. 예를 들어 패션
MNIST
의 경우 각각
60
,
000
개와
10
,
000
개의 샘플이 있었습니다. 하지
만 이 분할을 사용하고 싶지 않다면 어떻게 할까요? 필요에 따라 직접 데이터를 분할하고 싶다
면 어떻게 해야 할까요?
다행히도
datasets
라이브러리를 사용하면 쉽고 직관적인
API
로 이 작업을 수행할 수 있습니다.
예를 들어 이전에
FashionMNIST
클래스를 로드할 때
train
매개변수를 지정해 훈련 데이터
(
60
,
000
개 레코드) 또는 테스트 데이터(
10
,
000
개 레코드)를 받았습니다.
이를 단순히 무시한 채로 재정의하면 모든 데이터를 얻게 됩니다.
# 전체 패션 MNIST 데이터셋 로드 ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month, and much more.
O’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
I wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
I’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
I'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.