Amazon SageMaker는 기계 학습을 위한 데이터와 알고리즘, 프레임워크를 빠르게 연결하에 손쉽게 ML 구축이 가능한 신규 클라우드 서비스입니다. 이번 시간에는 Amazon S3에 저장된 학습 데이터를 이용하여 가장 일반적으로 사용하는 알고리즘 몇 가지를 직접 실행해 보는 실습을 진행합니다. 이를 위해 유명한 오픈 소스 프레임워크인 TensorFlow와 Keras 그리고 Apache MXNet과 Gluon 등을 사용해 봅니다.
F R A M E W O R K S A N D I N T E R FA C E S
P3
P3 Instance Deep Learning
AMI
Frameworks
PLATFORM SERVICES
VISION LANGUAGE VR/IR
APPLICATION SERVICE
AWS DeepLensAmazon SageMaker Amazon Machine Learning Amazon EMR & SparkMechanical Turk
AWS DEEP LEARNING AMI
Apache MXNet TensorFlowCaffe2 Torch KerasCNTK PyTorch GluonTheano
INSTANCES
GPU (G2/P2/P3) CPU (C5)
NVIDIA
Tesla V100 GPU
5,120 Tensor cores 1 Petaflop
128GB of memory NVLink 2.0
14X faster than P2
C A D
,65 .88 387 9 ,41 e
t g
2 8 H DM
55
2 8 H u
EW
L p a
L y
E n L r
2 8 t g
,65 in 2 8 H S E
,65A C I E L r
2 +2 2 2
J E C
Discrete Classification,
Regression
Linear Learner Supervised
XGBoost Algorithm Supervised
Discrete Recommendations Factorization Machines Supervised
Image Classification Image Classification Algorithm Supervised, CNN
Neural Machine Translation Sequence to Sequence Supervised, seq2seq
Time-series Prediction DeepAR Supervised, RNN
Discrete Groupings K-Means Algorithm Unsupervised
Dimensionality Reduction PCA (Principal Component Analysis) Unsupervised
Topic Determination Latent Dirichlet Allocation (LDA) Unsupervised
Neural Topic Model (NTM) Unsupervised,
Neural Network Based
K-Means Clustering
Principal Component Analysis
Neural Topic Modelling
Factorization Machines
Linear Learner - Regression
XGBoost
Latent Dirichlet Allocation
Image Classification
Seq2Seq
Linear Learner - Classification
BUILT
ALGORITHMS
Caffe2, CNTK, PyTorch, Torch
IM Estimators in Spark
DEEP LEARNING
FRAMEWORKS
Bring Your Own Script
(IM builds the Container)
BRING YOUR OWN
MODEL
ML
Training
code
Fetch Training data
Save Model
Artifacts
Amazon ECR
Save Inference
Image
Amazon S3
## train data
num_gpus = 4
gpus = [mx.gpu(i) for i in range(num_gpus)]
model = mx.model.FeedForward(
ctx = gpus,
symbol = softmax,
num_round = 20,
learning_rate = 0.01,
momentum = 0.9,
wd = 0.00001)
model.fit(X = train, eval_data = val,
batch_end_callback =
mx.callback.Speedometer(batch_size=batch_size))
기반 예제
B : A I A AA
• ( A B
• . DD A DD A B A
• A A IBD A AD D AD
• -A D AD D : D
• BB A
• -. D A: D :
• /D BD D A
• - AD C D :
• A D
• D A D )A B D A A
)..
http://mxnet.io/
https://github.com/dmlc/mxnet
http://incubator.apache.org/projects/mxnet.html
We plan to use Amazon SageMaker to train models
against petabytes of Earth observation imagery datasets
using hosted Jupyter notebooks, so DigitalGlobe's
Geospatial Big Data Platform (GBDX) users can just push a
button, create a model, and deploy it all within one
scalable distributed environment at scale.
- Dr. Walter Scott, CTO of Maxar Technologies and founder of DigitalGlobe
EC
: A C
“With Amazon SageMaker, we can accelerate our Artificial Intelligence
initiatives at scale by building and deploying our algorithms on the
platform. We will create novel large-scale machine learning and AI
algorithms and deploy them on this platform to solve complex
problems that can power prosperity for our customers."
- Ashok Srivastava, Chief Data Officer, Intuit
. 2 ) ( 1
G) : - h U 9 8 ).0 h U G) : - h U
8 )/ h U 9 ) 8 .- h U 8 )/ h U
D) 8 ( )- h U D* ) 8 )/ h U D) 8 ( )- h U
wU ( od k x (. pg g z k x ( pg g z
m 553 g n ( 42U -62
o e i (- 42U (- 42U
3A
• S a pg g1 G) : cm ) h
• 1 8 cm h
• g 1 8 cm () h
T s u 753 l ) (/ )n r
i l t 1 GGD 1 8 8 8 B 9 8 8 D 9 B
. 6 3
70 r z d h ( ,w B ) = J 6J =G n
h a y * o B B:G = s h ( o
B ) = J n *53 )53d 2 : D 8*
(53 g c U ( (
w n a w p Q
( , B ) = J /.)
) B B:G = ( () ) )
. B ) = J , *,,
tuxp
( 1 53 ( 1 53 . (,,,,
( 1 53 ( 1 53 53 ( ( /
2 : D 8* p *53 /
iS m k z e U 84 ) (/ )
x l0 0 : : : D A : = :A=G G D