Skip to Content
밑바닥부터 시작하는 딥러닝
book

밑바닥부터 시작하는 딥러닝

by 사이토 고키, 개앞맵시(이복연)
January 2017
Beginner to intermediate
312 pages
7h 3m
Korean
Hanbit Media, Inc.
Content preview from 밑바닥부터 시작하는 딥러닝
82
밑바닥부터 시작하는 딥러닝
3.3.3
신경망의 내적
그럼 넘파이 행렬을 써서 신경망을 구현해보겠습니다. 이번 예에서는 [그림
3
-
14
]의 간단한
신경망을 가정해보죠. 이 신경망은 편향과 활성화 함수를 생략하고 가중치만 갖습니다.
그림
3-14
행렬의 곱으로 신경망의 계산을 수행한다.
일치
이 구현에서도
X
,
W
,
Y
의 형상을 주의해서 보세요. 특히
X
와
W
의 대응하는 차원의 원소 수
가 같아야 한다는 걸 잊지 말아야 합니다.
>>>
X
=
np
.
array
([
1
,
2
])
>>>
X
.
shape
(
2
,)
>>>
W
=
np
.
array
([[
1
,
3
,
5
],
[
2
,
4
,
6
]])
>>>
print
(
W
)
[[
1 3 5
]
[
2 4 6
]]
>>>
W
.
shape
(
2
,
3
)
>>>
Y
=
np
.
dot
(
X
,
W
)
>>>
print
(
Y
)
[
5 11 17
]
다차원 배열의 내적을 구해주는
np
.
dot
함수를 사용하면 이처럼 단번에 결과
Y
를 계산할
수 있습니다.
Y
의 원소가
100
개든
1
,
000
개든 한 번의 연산으로 계산할 수 있습니다! 만약
np
.
dot
을 사용하지 않으면
Y
의 원소를 하나씩 따져봐야 합니다 (또는
for
문을 사용해서 계산
해야 하는데, 굉장히 귀찮겠지요). 그래서 행렬의 내적으로 한꺼번에 계산해주는 기능은 신경
망을 구현할 때 매우 중요하다고 말할 수 있습니다.
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.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’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
QuotationMarkI 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
QuotationMarkI’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
QuotationMarkI'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.
Mark W.
Embedded Software Engineer

You might also like

밑바닥부터 시작하는 비트코인

밑바닥부터 시작하는 비트코인

류정필, 송재준
엑셀이 편해지는 파이썬

엑셀이 편해지는 파이썬

펠릭스 춤슈타인

Publisher Resources

ISBN: 9788968484636