실전에서는 이런 방법 대신 이미지의 특정 부분을 무작위로 선택하여 잘라내는 방식을 보편적으
로 사용합니다. 즉 에포크(데이터셋의 이미지가 모두 한 번씩 모델에 입력된 주기)마다 무작위
로 각 이미지의 다른 부분을 선택합니다. 이 방식은 모델이 각 이미지의 서로 다른 위치에서 드
러난 특징에 집중하여, 다양성을 인식할 수 있는 방향으로 학습되는 기회를 제공합니다. 또한 같
은 대상을 찍더라도 사진마다 약간씩 다른 방식으로 대상을 표현한다는 실질적인 이미지의 특징
을 반영하기도 합니다.
사실 학습되지 않은 신경망은 이미지의 변화하는 모양을 파악하지 못합니다. 물체가
1
도 회전
하더라도, 회전 전후의 사진이 같다는 사실을 전혀 인지하지 못하죠. 따라서 위치와 크기가 약
간씩 다른 이미지로 모델을 학습시키면, 그 이미지에 포함된 물체의 기본 개념과 표현된 방식
을 이해하는 데 도움이 될 것입니다.
다음은 이전 예제 코드와 매우 비슷합니다. 직전에 설명한 변형의 방식을 적용하려고
Resize
를
RandomResizedCrop
으로 대체한 점만 다릅니다.
RandomResizedCrop
변형에서는
min
_
scale
인자가 매우 중요합니다. 이 인자는 매번 이미지의 ...
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.