마지막으로 배치 단위로 분류한 결과를 실제 답과 비교합니다. 이를 위해 == 연산자를 사용해
넘파이 배열끼리 비교하여
True
/
False
로 구성된
bool
배열을 만들고, 이 결과 배열에서
True
가 몇 개인지 셉니다. 이 처리 과정은 다음 예에서 확인해보죠.
>>>
y
=
np
.
array
([
1
,
2
,
1
,
0
])
>>>
t
=
np
.
array
([
1
,
2
,
0
,
0
])
>>>
print
(
y
==
t
)
[
True True False True
]
>>>
np
.
sum
(
y
==
t
)
3
이상으로 배치 처리 구현에 대한 설명을 마칩니다. 데이터를 배치로 처리함으로써 효율적이고
빠르게 처리할 수 있었습니다. 다음 장에서 진행할 신경망 학습에서도 이미지 데이터를 적절히
묶어서 학습하는데, 그때도 이번 장에서 구현한 배치 처리와 같은 방식으로 구현하게 됩니다.
3.7
정리
이번 장에서는 신경망의 순전파를 살펴봤습니다. 이번 장에서 설명한 신경망은 각 층의 뉴런
들이 다음 층의 뉴런으로 신호를 전달한다는 점에서 앞 장의 퍼셉트론과 ...
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.