COGNITIVE TOOLKIT, CNTK
THE MICROSOFT COGNITIVE TOOLKIT
 Microsoft Research
 64bits Linux & Windows
 Open Source
 Docker images
 Docker, Jupyter
 Support
 Python, C++, Brain Script, C#, Network definition language (NDL) and model editing language (MEL)
 DNN, CNN, RNN, LSTM, DSSM, Log-linear model
ACCESSIBILITY:HTTP://BLOGS.NVIDIA.COM/BLOG/2016/01/12/ACCELERATING-AI-ARTIFICIAL-INTELLIGENCE-GPUS/
ARCHITECTURE
CNICNBuilderCN
Description Use Build
ILearnerIDataReaderFeatures &
Labels Load Get data
IExecutionEngine
CPU/GPU
Task-specific
reader
SGD, AdaGrad,
etc.
Evaluate
Compute Gradient
MICROSOFT DEVELOPED ARTIFICIAL INTELLIGENCE
Vision
• Computer Vision APIs
• Face APIs
• Emotion APIs
• Video APIs
Speech
• Speech APIs
• Speaker Recognition APIs
• Custom Recognition
Intelligent Service
Language
• Spell Check APIs
• Language Understanding
Intelligent Service
• Web Language Model
APIs
LUIS, LANGUAGE UNDERSTANDING INTELLIGENT SERVICE
BOT FRAMEWORK
安裝CNTK
 從 GitHub 下載並解壓縮檔案
 github.com/Microsoft/CNTK/releases
 CPU、GPU、GPU – SGD (Stochastic Gradient
Descent)
 Command Prompt
 cntkScriptsinstallwindowsinstall.bat
 cntkScriptscntkpy35.bat
 檢查 Environment
 Path增加路徑:cntk/cntk/cntk.exe 路徑
 VS2015 Runtime
 MSMPI:C++多執行緒支援SDK
 Anaconda3
 C:localAnaconda3-4.1.1-Windows-x86_64
 A CNTK-PY35 environment
 C:localAnaconda3-4.1.1-Windows-x86_64envs
 The CNTK Python module
 CNTK-PY35 environment
資料檔案MNIST
 解壓縮資料夾/Examples/Image/DataSets/MNIST
 python install_mnist.py
 資料來源
 http://yann.lecun.com/exdb/mnist/
 資料集合
 Feature:1,000
 Train-28x28_cntk_text.txt:60,000
 Test-28x28_cntk_text.txt:10,000
測試MNIST
 解壓縮資料夾cntkExamplesImageGettingStartedREADME.md
 cntk configFile=01_OneHidden.cntk
 cntk configFile=02_OneConv.cntk
 cntk configFile=03_OneConvDropout.cntk
 cntk configFile=04_OneConvBN.cntk
 cntk configFile=05_OneConvRegr.cntk
 mpiexec -n 2 cntk configFile=06_OneConvRegrMultiNode.cntk parallelTrain=True
parallelizationMethod=DataParallelSGD
 cntk configFile=07_Deconvolution_BS.cntk
測試MNIST
Epocch 15
Minibatch 500
Perplexity errs (*10000) ce (*10000)
01_OneHidden ReLU 1.06159522 1.720% 0.05977271
02_OneConv #sudo-image 16 x 24 x 24
ConvolutionalLayer {16,(5:5),pad = true}
#feature map 16 x 12 x 12
MaxPoolingLayer {(2:2),stride=(2:2)(5:5)}
# HiddenLayer 64
DenseLayer {64}
1.03299019 1.020% 0.03245770
03_OneConvDropout #feature map 16 x 12 x 12
MaxPoolingLayer:Dropout
1.03015284 0.980% 0.02970718
04_OneConvBN BatchNormalizationLayer
(on CPU not yet implemented.)
測試MNIST
Epocch 15
Minibatch 500
rmse(*10000) totalSamplesSeen learningRatePerSample
05_OneConvRegr 02_OneConv
RMSE
0.05052825
06_OneConvRegr
MultiNode
parallelizationMetho
d
0.05116006 x 900000 0.00050000002
07_Deconvolution (Minibatch 10)
Deconvolutio
Unpooling
0.22284064
建立設定檔:MAKEMODEL.CNTK
CNTK.EXE CONFIGFILE=MAKEMODEL.CNTK MAKEMODE=FALSE
執行參數
 modelPath = "ModelSimpleNet.snn“
 模型存放檔案名稱
 deviceId = -1
 CPU (-1)
 GPU (0)
 dimension = 2
 labelDimension = 3
 precision = "float“
 float
 double
Modularized
 computational networks
 execution engine
 learning algorithms
 model description
 data readers
建立設定檔:MAKEMODEL.CNTK
CNTK.EXE CONFIGFILE=MAKEMODEL.CNTK MAKEMODE=FALSE
Train =
[
action="train"
BrainScriptNetworkBuilder =
[
# define network here
]
]
Test =
[
# training commands here
]
WriteProbs =
[
# output commands here
]
DumpWeights =
[
# output commands here
# 加權和偏差定義預測模型
]
TRAIN模組:SGD參數
 epochSize = 0
 要使用多少訓練資料;0 = 使用所有資料
 minibatchSize = 1
 MinibatchSize 變數會指定每次訓練處理多少資料
 learningRatesPerSample = 0.04
 maxEpochs = 500
 變數指定的訓練執行多少反覆項目
 momentumPerMB = 0.90
 處理多少資料時作紀錄
TEST模組
 ce = CrossEntropyWithSoftmax (labels, myNet)
 使用 Cross Entropy 計算訓練資料中的實際輸出值
 err = ErrorPrediction (labels, myNet)
 預測模型的精確度(百分比)、Cross Entropy、Perplexity
 計算結果輸出和實際輸出之間的誤差
 pn = Softmax (myNet)
 輸出結果,機率值,正規化值總和為 1.0
WRITEPROBS模組
 此模組是選擇性的但很有幫助,因為它可讓您對測試資料所做預測的其他資訊
 WriteProbs 模組等同於測試模組,但不包括三個變更
 動作參數設為 「 寫入 」 而不是"test“
 移除 randomize 參數 (因為 false 是預設值)
 加入 outputPath 參數
 WriteProbs 模組執行時,它會寫入指定的檔案來測試資料的確切的輸出值
 .pn:這是在訓練模組的輸出節點使用的變數名稱
DUMP WEIGHTS模組
 在執行時,此模組會儲存已訓練的模型加權和偏差值檔案
 檔案會儲存在 modelPath 參數指定的路徑
 .snn 是 使用二進位格式儲存的模型檔
 maxEpochs 參數設定為 500
 數字編號,最後 500 個檔案
 .ckp是二進位的檢查點檔案
 訓練複雜的類神經網路可以需要幾小時甚至幾天
MNIST測試:執行結果
01_OneHidden 02_OneConv
MNIST測試:執行結果
03_OneConvdropout 04_OneConvBN
MNIST測試:執行結果
05_OneConvRegr 06_OneConvRegrMultiNode
MNIST測試:執行結果
07_Deconvolution
THANK YOU!

More Related Content

PPTX
給初學者的Spark教學
PDF
Spark 巨量資料處理基礎教學
PDF
選擇正確的Solution 來建置現代化的雲端資料倉儲
PDF
Apache IoTDB 工业互联网时序数据库 meetup-2019.12
PDF
Introduction and Internals of SQL on hadoop by WangHaihua
PDF
Make your DVR playground using DevStack
PDF
Data Analyse Black Horse - ClickHouse
PDF
准实时海量数据分析系统架构探究
給初學者的Spark教學
Spark 巨量資料處理基礎教學
選擇正確的Solution 來建置現代化的雲端資料倉儲
Apache IoTDB 工业互联网时序数据库 meetup-2019.12
Introduction and Internals of SQL on hadoop by WangHaihua
Make your DVR playground using DevStack
Data Analyse Black Horse - ClickHouse
准实时海量数据分析系统架构探究

Similar to Microsoft CNTK, Cognitive Toolkit 微軟深度學習工具 (20)

PDF
2011 06-12-lamp-mysql
PDF
2011 06-12-lamp-mysql-顾春江
PPTX
Baidu LSP and DISQL for Log Analysis
PDF
Tcfsh bootcamp day2
PDF
ASP.NET Core 2.1設計新思維與新發展
PPTX
LinkIt 7697 IoT tutorial
PDF
Accelerating or Complicating PHP execution by LLVM Compiler Infrastructure
PDF
探索 ISTIO 新型 DATA PLANE 架構 AMBIENT MESH - GOLANG TAIWAN GATHERING #77 X CNTUG
PDF
和Android源代码一起工作 | 海豚浏览器 胡继堂
PPT
香港六合彩
PPTX
20141128(刘胜)UTC2014分布式和云服务的思考与实践——支付清算行业分布式架构的探索
PDF
Micro service
PDF
2014 Hpocon 吴磊 ucloud - 由点到面 提升公有云服务可用性
PPTX
2018 VLSI/CAD Symposium Tutorial (Aug. 7, 20:00-21:00 Room 3F-VII)
PDF
Mysql handlersocket
PPT
部門會議 950619 Leon的錦囊妙計
PPTX
Api Code Pack For Net Framework
PDF
恶意网页分析实战
PDF
rebar erlang 2
2011 06-12-lamp-mysql
2011 06-12-lamp-mysql-顾春江
Baidu LSP and DISQL for Log Analysis
Tcfsh bootcamp day2
ASP.NET Core 2.1設計新思維與新發展
LinkIt 7697 IoT tutorial
Accelerating or Complicating PHP execution by LLVM Compiler Infrastructure
探索 ISTIO 新型 DATA PLANE 架構 AMBIENT MESH - GOLANG TAIWAN GATHERING #77 X CNTUG
和Android源代码一起工作 | 海豚浏览器 胡继堂
香港六合彩
20141128(刘胜)UTC2014分布式和云服务的思考与实践——支付清算行业分布式架构的探索
Micro service
2014 Hpocon 吴磊 ucloud - 由点到面 提升公有云服务可用性
2018 VLSI/CAD Symposium Tutorial (Aug. 7, 20:00-21:00 Room 3F-VII)
Mysql handlersocket
部門會議 950619 Leon的錦囊妙計
Api Code Pack For Net Framework
恶意网页分析实战
rebar erlang 2
Ad

More from HO-HSUN LIN (7)

PPTX
以太坊(Ethereum) solidity & web3.js
PDF
區塊鏈與金融科技(Blockchain and Fintech)
PPTX
Tensorflow + Keras & Open AI Gym
PPTX
Chaincode Development 區塊鏈鏈碼開發
PPTX
Net Parallel Programming .NET平行處理與執行序
PPTX
ASP.NET AJAX
PPTX
SQL Loader & Bulk Insert 大量資料匯入工具
以太坊(Ethereum) solidity & web3.js
區塊鏈與金融科技(Blockchain and Fintech)
Tensorflow + Keras & Open AI Gym
Chaincode Development 區塊鏈鏈碼開發
Net Parallel Programming .NET平行處理與執行序
ASP.NET AJAX
SQL Loader & Bulk Insert 大量資料匯入工具
Ad

Microsoft CNTK, Cognitive Toolkit 微軟深度學習工具