Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

DLLab 2018 - Azure Machine Learning update

734 views

Published on

Azure Batch AI の行く先は、Azure Machine Learning への統合です。特に、Automated Machine Learning と Hyperparameter Explorer に焦点を当ててます。

Published in: Technology
  • It is really helpful. thanks
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here

DLLab 2018 - Azure Machine Learning update

  1. 1. トレーニング済みのモデル ビジネスロジックにMLをアタッチ Azure Databricks VMs Deep Learning Framework Deep Learning モデルの作成 TensorFlow KerasPytorch Azure Machine Learning LanguageSpeech … SearchVision On-premises Cloud Edge 生産性の高いサービス データサイエンティストと開発チームの生産性を上げる 強力なインフラストラクチャー Deep Learning の学習と推論の加速 柔軟な推論環境の選択肢 Cloud と Edge へのモデル展開と管理 Chainer
  2. 2.           
  3. 3. Purpose Graphics VM Family NV v1 GPU NVIDIA M60 Sizes 1, 2 or 4 GPU Interconnect PCIe (dual root) 2nd Network VM CPU Haswell VM RAM 56-224 GB Local SSD ~380-1500 GB Storage Std Storage Driver Quadro/Grid PC Compute Compute Compute NC v1 NC v2 NC v3 NVIDIA K80 NVIDIA P100 NVIDIA V100 1, 2 or 4 GPU 1, 2 or 4 GPU 1, 2 or 4 GPU PCIe (dual root) PCIe (dual root) PCIe (dual root) FDR InfiniBand FDR InfiniBand FDR InfiniBand Haswell Broadwell Broadwell 56-224 GB 112-448 GB 112-448 GB ~380-1500 GB ~700-3000 GB ~700-3000 GB Std Storage Prem Storage Prem Storage Tesla Tesla Tesla Deep Learning ND v1 NVIDIA P40 1, 2 or 4 GPU PCIe (dual root) FDR InfiniBand Broadwell 112-448 GB ~700-3000 GB Prem Storage Tesla
  4. 4. Purpose Graphics VM Family NV v2 GPU NVIDIA M60 Sizes 1, 2 or 4 GPU Interconnect PCIe (dual root) 2nd Network VM CPU Broadwell VM RAM 112-448 GB Local SSD ~700-3000 GB Storage Prem Storage Driver Quadro/Grid PC Deep Learning ND v2 NVIDIA V100 8 GPU NVLink Skylake 672 GB ~1300 GB Prem Storage
  5. 5. 1. 課題の特定 2. データの取得と加工 3. モデルの設計 4. モデルの学 習 5. モデルの テストと評価 a. 初期化 b. データセットからミニバッチ データ取得 c. 損失(差分)を計算d. 最適化: 損失(差分)の最小 化 e. 重みづけの更新 y =Wx + b loss = |desired – actual outcome|δ 6. 展開と推論
  6. 6. My Computer Experiment Docker Image Data Store Compute Target Azure ML Workspace
  7. 7. Source: http://scikit-learn.org/stable/tutorial/machine_learning_map/index.html
  8. 8. Mileage Condition Car brand Year of make Regulations … Parameter 1 Parameter 2 Parameter 3 Parameter 4 … Gradient Boosted Nearest Neighbors SVM Bayesian Regression LGBM … Mileage Gradient Boosted Criterion Loss Min Samples Split Min Samples Leaf Others Model Which algorithm? Which parameters?Which features? Car brand Year of make
  9. 9. Criterion Loss Min Samples Split Min Samples Leaf Others N Neighbors Weights Metric P Others Which algorithm? Which parameters?Which features? Mileage Condition Car brand Year of make Regulations … Gradient Boosted Nearest Neighbors SVM Bayesian Regression LGBM … Nearest Neighbors Model 繰り返し Gradient BoostedMileage Car brand Year of make Car brand Year of make Condition
  10. 10. Which algorithm? Which parameters?Which features? 繰り返し
  11. 11. データセット 目標設定 学習の一貫性 出力入力値 並列処理で学習を実行 ベストなモデルの選択 Optimized model
  12. 12. from import ##Local compute 'classification' 'AUC_weighted' 12000 20 3 0.9985 'kNN' 'LinearSVM'
  13. 13. Number_of_ hidden_layers Number_of_ nodes_in_layer Input layer Hidden layer 1 Hidden layer 2 Output layer E.g. Learning_rate Batch_size
  14. 14. Challenges • 探索箇所が広大 • 低密度の中での、最適な値の組み合 わせ • 評価までのリソースが膨大(時間、人、 カネ) 例えば.. • Number_of_layers と learning_rate の最適値 • Number_of_layers – [2, 4, 8] • learning_rate – 0 から 1 の間の あらゆる値
  15. 15. #1 #2 #𝑝 𝑟𝑢𝑛1 𝑟𝑢𝑛2 𝑟𝑢𝑛 𝑝 … Hyperparameter Tuning runs in Azure ML 𝑟𝑢𝑛𝑗 𝑟𝑢𝑛𝑖 𝑟𝑢𝑛 𝑘 (B) 起動中のジョブの管理 • どれくらいの間実行してい るのか? ??? (A) 新規ジョブ起動 • 探索する、Parameter を設 定 𝒓𝒖𝒏 𝟏= {learning rate=0.2, #layers=2, …} 𝒓𝒖𝒏 𝟐= {learning rate=0.5, #layers=4, …} 𝒓𝒖𝒏 𝒑= {learning rate=0.9, #layers=8, …}
  16. 16. Early terminate poorly performing runs
  17. 17. ## エスティメーターの作成 from azureml.train.dnn import TensorFlow script_params = { '--data-folder': ws.get_default_datastore().as_mount(), '--batch-size': 50, '--first-layer-neurons': 300, '--second-layer-neurons': 100, '--learning-rate': 0.01 } estimator = TensorFlow(source_directory=script_folder, script_params=script_params, compute_target=compute_target, entry_script='tf_mnist.py', use_gpu=True)
  18. 18. ## 探索空間の設定 from azureml.train.hyperdrive import GridParameterSampling param_sampling = GridParameterSampling( { "num_hidden_layers": choice(1, 2, 3), "batch_size": choice(16, 32) } ) ## 探索空間の設定 from azureml.train.hyperdrive import MedianStoppingPolicy early_termination_policy = MedianStoppingPolicy(evaluation_interval=1, delay_evaluation=5) ## Hyperparameter Search 設定 from azureml.train.hyperdrive import HyperDriveRunConfig hyperdrive_run_config = HyperDriveRunConfig(estimator=estimator, hyperparameter_sampling=param_sampling, policy=early_termination_policy, primary_metric_name=’accuracy’, primary_metric_goal=PrimaryMetricGoal.MAXIMIZE, max_total_runs=100, max_concurrent_runs=4)
  19. 19. Learn more Start now

×