SlideShare a Scribd company logo
딥러닝, 야 너도 할 수 있어(feat. PyTorch)
딥러닝, 야 너도 할 수 있어(feat. PyTorch)
딥러닝, 야 너도 할 수 있어(feat. PyTorch)
딥러닝, 야 너도 할 수 있어(feat. PyTorch)
딥러닝, 야 너도 할 수 있어(feat. PyTorch)
딥러닝, 야 너도 할 수 있어(feat. PyTorch)
딥러닝, 야 너도 할 수 있어(feat. PyTorch)
딥러닝, 야 너도 할 수 있어(feat. PyTorch)
딥러닝, 야 너도 할 수 있어(feat. PyTorch)
딥러닝, 야 너도 할 수 있어(feat. PyTorch)
딥러닝, 야 너도 할 수 있어(feat. PyTorch)
https://jupyter.org
딥러닝, 야 너도 할 수 있어(feat. PyTorch)
딥러닝, 야 너도 할 수 있어(feat. PyTorch)
딥러닝, 야 너도 할 수 있어(feat. PyTorch)
딥러닝, 야 너도 할 수 있어(feat. PyTorch)
딥러닝, 야 너도 할 수 있어(feat. PyTorch)
Hours Score
10 90
9 80
3 50
2 30
(“ ” – ” ”)&
Model	1	𝐻( 𝑥 = 6.6𝑥 + 22.9
Model	2	𝐻& 𝑥 = 5.5𝑥 + 34.5
Model	3	𝐻3 𝑥 = 8.25𝑥 + 23
𝐱 𝐲 𝐇 𝟏 𝐱 (𝐇 𝟏 𝐱 − 𝐲) 𝟐
𝐇 𝟐 𝐱 (𝐇 𝟐 𝐱 − 𝐲) 𝟐
𝐇 𝟑 𝐱 (𝐇 𝟑 𝐱 − 𝐲) 𝟐
0
20
40
60
80
100
0 5 10 15
𝐇 𝐱 = 𝐚𝐱 + 𝐛
𝐇 𝐱 = 𝐰 𝟏×𝐱 + 𝐰 𝟎×𝟏
𝐖 = 𝐰 𝟏 𝐰 𝟎 𝐗 =
𝐱
𝟏
𝐇 𝐱 = 𝐖𝐗
𝐖
𝐖
𝛁𝐋𝐨𝐬𝐬
𝐋𝐨𝐬𝐬 𝐰
𝛂
𝐰
𝐖
𝟏
𝐦
∑𝐢K𝟏
𝐦
𝐖×𝐗 𝐢 − 𝐲 𝐢 𝟐
(예측 값 – 실제 값)&
𝐇 𝐱 = 𝐖𝐗
𝐦𝐢𝐧𝐢𝐦𝐢𝐳𝐞 𝑳𝒐𝒔𝒔 𝐰
𝐖
!"#$$
"#$$ %
&
%	
𝛁𝐋𝐨𝐬𝐬
𝐖 = 𝐖 − 𝛂𝛁𝐋𝐨𝐬𝐬
𝝈 𝒙 = 𝑠𝑖𝑔𝑚𝑜𝑖𝑑 𝑥 =
1
1 + e]
𝐇 𝒙 = 𝐚𝐜𝐭𝐢𝐯𝐚𝐭𝐢𝐨𝐧_𝐟𝐧(𝒘 𝟎 + 𝒘 𝟏 𝒙 𝟏 + ⋯ + 𝒘 𝒏 𝒙 𝒏)
𝑥f
bias(wl)
𝐻 𝑥
𝑥(
𝚺 𝝈
𝑥&
𝝈 𝒙 = 𝑟𝑒𝑙𝑢 𝑥 = r
𝑥 = 0 (𝑥 < 0)
𝑥 = 𝑥 (𝑥 ≥ 0)
𝐇 𝒙 = 𝐬𝐢𝐠𝐦𝐨𝐢𝐝 (𝒘 𝟎 + 𝒘 𝟏 𝒙 𝟏 + ⋯ + 𝒘 𝒏 𝒙 𝒏) =
𝟏
𝟏 + 𝐞(∑ 𝒘 𝒊 𝒙 𝒊)
𝑥f
w(
bias(wl)
H 𝑥𝚺 𝝈
𝝈 𝒙 = 𝑠𝑖𝑔𝑚𝑜𝑖𝑑 𝑥 =
1
1 + e]
𝑥(
𝑤f
𝑥( 𝑥&
𝑥f
𝑥&
𝑥f
w(
bias(wl)
H 𝑥𝚺 𝝈
𝑥(
𝑤f
class	MyModel(torch.nn.Module):				
def __init__(self):								
super(MyScoreModel,	self).__init__()
self.weights =	torch.nn.Parameter(torch.randn(n))
self.bias =	torch.nn.Parameter(torch.randn(1))
self.activation_fn	=	torch.nn.Sigmoid()
def forward(self,	x):
output	=	self.weights *	x	+	self.bias
output	=	self.activation_fn(output)
return	output
𝑥f
bias
𝐻( 𝑥
𝑥(
class	MyModel(torch.nn.Module):				
def __init__(self,	input_num=n,	output_num=1):								
super(MyScoreModel,	self).__init__()
self.linear =	torch.nn.Linear(in_features=n,	
out_features=1,	
bias	=	True)
self.activation_fn	=	torch.nn.Sigmoid()
def forward(self,	x):
output	=	self.linear(x)
output	=	self.activation_fn(output)
return	output
𝑥{
𝑥3
𝑥&
𝑥(
Weights
𝑦&
𝑦(
Weights
•
•
•
•
•
𝑥f
𝑥(
Weights
𝑦&
𝑦(
Weights
Weights
𝑥f
𝑥(
Weights
𝑦&
𝑦(
Weights
Weights
class	MyModel(torch.nn.Module):				
def __init__(self):								
super(MyScoreModel,	self).__init__()
self.linear1	=	torch.nn.Linear(in_features=n,	
out_features =m)
self.linear2	=	torch.nn.Linear(in_features=m,	
out_features =p)
self.linear3	=	torch.nn.Linear(in_features=p,	
out_features =2)
self.activation_fn	=	torch.nn.Sigmoid()
def forward(self,	x):
output	=	self.activation_fn(self.linear1(x))
output	=	self.activation_fn(self.linear2(output))
output	=	self.linear3(output)
return	output
𝑜((
𝑜(•
𝑜&(
𝑜&‚
𝑥&
𝑥(
𝑥3ƒ
outl
out(
out†††
𝑥&
𝑥(
𝑥3ƒ
𝑥&
𝑥(
𝑥ƒ‡‡3ƒ
outl
out(
out†††
𝑥&
𝑥(
𝑥3ƒ
𝑂(ƒ
outl
out(
out†††
𝑂((
𝑂(ƒ
𝑂((𝑤(
𝑤{𝑤‡
𝑤‰
𝑤3&
𝑤3ƒ
𝑥&
𝑥(
𝑥3ƒ
𝑤(
𝑤&(ƒ
outl
out(
out†††
𝑂(ƒ
𝑂((
𝑤(
𝑤{𝑤(
𝑤{
𝑤(
𝑤{
𝑥&
𝑥(
𝑥3ƒ
𝑤(
𝑤{
𝑤(
𝑤{
𝝈
𝑤(
𝑤{
𝑤(
𝑤{
𝝈
딥러닝, 야 너도 할 수 있어(feat. PyTorch)
딥러닝, 야 너도 할 수 있어(feat. PyTorch)
𝑤( 𝑤&
𝑤3 𝑤{
𝝈
딥러닝, 야 너도 할 수 있어(feat. PyTorch)
딥러닝, 야 너도 할 수 있어(feat. PyTorch)
class ConvModel(torch.nn.Module):
def __init__(self):
super().__init__()
self.conv1	= torch.nn.Conv2d(in_channels=1, out_channels=16,
kernel_size=3)
self.pool =	torch.nn.MaxPool2d(kernel_size=2)
self.conv2	=	torch.nn.Conv2d(in_channels=16, out_channels=32,
kernel_size=3)
self.fc1	= torch.nn.Linear(in_features=11*11*32, out_features=128)
self.fc2	= torch.nn.Linear(in_features=128, out_features=10)
self.relu = torch.nn.ReLU()
def forward(self, x):
x =	self.conv1(x)
x = self.relu(x)
x = self.pool(x)
x =	self.conv2(x)
x = self.relu(x)
x = x.view(x.shape[0], -1)
x =	self.fc1(x)
x = self.relu(x)
x.	= self.fc2(x)
return x
딥러닝, 야 너도 할 수 있어(feat. PyTorch)
딥러닝, 야 너도 할 수 있어(feat. PyTorch)
딥러닝, 야 너도 할 수 있어(feat. PyTorch)
딥러닝, 야 너도 할 수 있어(feat. PyTorch)
https://github.com/karansikka1/iFood_2019
딥러닝, 야 너도 할 수 있어(feat. PyTorch)
ImageNet Food Dataset
0
0
0
딥러닝, 야 너도 할 수 있어(feat. PyTorch)
class	FoodDataset(torch.utils.data.Dataset):
def __init__(self,	datafile):	
self.samples =	[]
lines	=	open(datafile).read().splitlines()
for	line	in	lines:
path,	label	=	line.split(‘:’)
self.samples.append((path,	label))
def __getitem__(self,	idx):
path,	label	=	self.samples[idx]
image	=	cv2.imread(path)
...
return	image,	float(label)
def __len__(self):
return	len(self.samples)
train_dataset =	FoodDataset('dataset/data.list’)
train_loader =	torch.utils.data.DataLoader(dataset=train_dataset,	batch_size=batch_size,	shuffle=True)
image_converter =	transforms.ToPILImage()
for	images,	labels	in	train_loader:				
label	=	str(labels[0].numpy())				
image	=	image_converter(images[0])			
print	(label,	id_to_names[label])				
plt.imshow(image)
plt.show()
fc1000
import	torchvision.models as	models
class	FoodModel(torch.nn.Module):				
def __init__(self):
super().__init__()
self.model =	models.resnet18(pretrained=True)	
self.model.fc =	torch.nn.Linear(512,	20)
def forward(self,	x):
return	self.model(x)
딥러닝, 야 너도 할 수 있어(feat. PyTorch)
딥러닝, 야 너도 할 수 있어(feat. PyTorch)
딥러닝, 야 너도 할 수 있어(feat. PyTorch)
딥러닝, 야 너도 할 수 있어(feat. PyTorch)

More Related Content

DOC
programming in C++ report
PDF
C programming 28 program
PPT
Pointers in C
PPTX
NFA to DFA Conversion Using Subset Construction Method
PPT
Strings in c
PPT
One dimensional 2
PDF
[2019] 패션 시소러스 기반 상품 특징 분석 시스템
PDF
[2019] 스몰 스텝: Android 렛츠기릿!
programming in C++ report
C programming 28 program
Pointers in C
NFA to DFA Conversion Using Subset Construction Method
Strings in c
One dimensional 2
[2019] 패션 시소러스 기반 상품 특징 분석 시스템
[2019] 스몰 스텝: Android 렛츠기릿!

More from NHN FORWARD (20)

PDF
NHN 베이스캠프: 신입사원들은 무엇을 배우나요?
PDF
[2019] GIF 스티커 만들기: 스파인 2D를 이용한 움직이는 스티커 만들기
PDF
[2019] 전기 먹는 하마의 다이어트 성공기 클라우드 데이터 센터의 에너지 절감 노력과 사례
PDF
[2019] 스몰 스텝: Dooray!를 이용한 업무 효율화/자동화(고객문의 시스템 구축)
PDF
[2019] 아직도 돈 주고 DB 쓰나요? for Developer
PDF
[2019] 아직도 돈 주고 DB 쓰나요 for DBA
PDF
[2019] 비주얼 브랜딩: Basic system
PDF
[2019] PAYCO 매거진 서버 Kotlin 적용기
PDF
[2019] 벅스 5.0 (feat. Kotlin, Jetpack)
PDF
[2019] Java에서 Fiber를 이용하여 동시성concurrency 프로그래밍 쉽게 하기
PDF
[2019] PAYCO 쇼핑 마이크로서비스 아키텍처(MSA) 전환기
PDF
[2019] 비식별 데이터로부터의 가치 창출과 수익화 사례
PDF
[2019] 게임 서버 대규모 부하 테스트와 모니터링 이렇게 해보자
PDF
[2019] 200만 동접 게임을 위한 MySQL 샤딩
PDF
[2019] 언리얼 엔진을 통해 살펴보는 리플렉션과 가비지 컬렉션
PDF
[2019] 글로벌 게임 서비스 노하우
PDF
[2019] 배틀로얄 전장(map) 제작으로 알아보는 슈팅 게임 레벨 디자인
PDF
[2019] 위치 기반 빅 데이터의 시각화와 지도
PDF
[2019] 웹 프레젠테이션 개발기: Dooray! 발표 모드 해부하기
PDF
[2019] 레거시 웹 서비스 길들이기: 서버 개발자의 SPA 적용기
NHN 베이스캠프: 신입사원들은 무엇을 배우나요?
[2019] GIF 스티커 만들기: 스파인 2D를 이용한 움직이는 스티커 만들기
[2019] 전기 먹는 하마의 다이어트 성공기 클라우드 데이터 센터의 에너지 절감 노력과 사례
[2019] 스몰 스텝: Dooray!를 이용한 업무 효율화/자동화(고객문의 시스템 구축)
[2019] 아직도 돈 주고 DB 쓰나요? for Developer
[2019] 아직도 돈 주고 DB 쓰나요 for DBA
[2019] 비주얼 브랜딩: Basic system
[2019] PAYCO 매거진 서버 Kotlin 적용기
[2019] 벅스 5.0 (feat. Kotlin, Jetpack)
[2019] Java에서 Fiber를 이용하여 동시성concurrency 프로그래밍 쉽게 하기
[2019] PAYCO 쇼핑 마이크로서비스 아키텍처(MSA) 전환기
[2019] 비식별 데이터로부터의 가치 창출과 수익화 사례
[2019] 게임 서버 대규모 부하 테스트와 모니터링 이렇게 해보자
[2019] 200만 동접 게임을 위한 MySQL 샤딩
[2019] 언리얼 엔진을 통해 살펴보는 리플렉션과 가비지 컬렉션
[2019] 글로벌 게임 서비스 노하우
[2019] 배틀로얄 전장(map) 제작으로 알아보는 슈팅 게임 레벨 디자인
[2019] 위치 기반 빅 데이터의 시각화와 지도
[2019] 웹 프레젠테이션 개발기: Dooray! 발표 모드 해부하기
[2019] 레거시 웹 서비스 길들이기: 서버 개발자의 SPA 적용기
Ad

Recently uploaded (20)

PPTX
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PPTX
Big Data Technologies - Introduction.pptx
PDF
cuic standard and advanced reporting.pdf
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PDF
KodekX | Application Modernization Development
PDF
Spectral efficient network and resource selection model in 5G networks
PPTX
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PDF
NewMind AI Monthly Chronicles - July 2025
PPT
Teaching material agriculture food technology
PDF
Encapsulation theory and applications.pdf
PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PDF
Approach and Philosophy of On baking technology
PDF
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
DOCX
The AUB Centre for AI in Media Proposal.docx
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
Advanced methodologies resolving dimensionality complications for autism neur...
Big Data Technologies - Introduction.pptx
cuic standard and advanced reporting.pdf
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
Building Integrated photovoltaic BIPV_UPV.pdf
KodekX | Application Modernization Development
Spectral efficient network and resource selection model in 5G networks
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
20250228 LYD VKU AI Blended-Learning.pptx
NewMind AI Monthly Chronicles - July 2025
Teaching material agriculture food technology
Encapsulation theory and applications.pdf
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
The Rise and Fall of 3GPP – Time for a Sabbatical?
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
Approach and Philosophy of On baking technology
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
The AUB Centre for AI in Media Proposal.docx
Ad

딥러닝, 야 너도 할 수 있어(feat. PyTorch)