Main Content

このページの翻訳は最新ではありません。ここをクリックして、英語の最新版を参照してください。

Intel MKL-DNN による音声コマンド認識コードの生成

この例では、音声コマンド認識のための特徴抽出と畳み込みニューラル ネットワーク (CNN) を Intel® プロセッサで展開する方法を説明します。特徴抽出とネットワーク コードを生成するために、MATLAB® Coder と Intel® Math Kernel Library for Deep Neural Networks (MKL-DNN) を使用します。この例では、生成されたコードは MATLAB 実行可能ファイル (MEX) 関数であり、予測された音声コマンドと時間領域信号および聴覚スペクトログラムを表示する MATLAB スクリプトによって呼び出されます。オーディオの前処理およびネットワーク学習の詳細については、Train Speech Command Recognition Model Using Deep Learning (Audio Toolbox)を参照してください。

必要条件

  • MATLAB Coder Interface for Deep Learning サポート パッケージ

  • Intel Advanced Vector Extensions 2 (Intel AVX2) をサポートする Xeon プロセッサ

  • Intel Math Kernel Library for Deep Neural Networks (MKL-DNN)

  • Intel MKL-DNN の環境変数

サポートされるライブラリのバージョン、および環境変数の設定の詳細については、MATLAB Coder を使用した深層学習の前提条件 (MATLAB Coder)を参照してください。

MATLAB でのストリーミングのデモ

特徴抽出パイプラインおよび分類に関して、Train Speech Command Recognition Model Using Deep Learning (Audio Toolbox)で構築したのと同じパラメーターを使用します。

ネットワークに学習させたのと同じサンプル レート (16 kHz) を定義します。分類レートと、フレームごとに入力されるオーディオ サンプルの数を定義します。ネットワークに入力される特徴は、オーディオ データ 1 秒に対応するバーク スペクトログラムです。バーク スペクトログラムは、10 ms のホップをもつ 25 ms のウィンドウについて計算されます。

fs = 16000; 
classificationRate = 20;
samplesPerCapture = fs/classificationRate;

segmentDuration = 1;
segmentSamples = round(segmentDuration*fs);

frameDuration = 0.025;
frameSamples = round(frameDuration*fs);

hopDuration = 0.010;
hopSamples = round(hopDuration*fs);

audioFeatureExtractor (Audio Toolbox)オブジェクトを作成し、ウィンドウを正規化せずに帯域数 50 のバーク スペクトログラムを抽出します。

afe = audioFeatureExtractor( ...
    'SampleRate',fs, ...
    'FFTLength',512, ...
    'Window',hann(frameSamples,'periodic'), ...
    'OverlapLength',frameSamples - hopSamples, ...
    'barkSpectrum',true);

numBands = 50;
setExtractorParameters(afe,'barkSpectrum','NumBands',numBands,'WindowNormalization',false);

事前学習済みの畳み込みニューラル ネットワークとラベルを読み込みます。

load('commandNet.mat')
labels = trainedNet.Layers(end).Classes;
numLabels = numel(labels);
backgroundIdx = find(labels == 'background'); 

バッファーおよび判定しきい値を定義し、ネットワーク予測を後処理します。

probBuffer = single(zeros([numLabels,classificationRate/2]));
YBuffer = single(numLabels * ones(1, classificationRate/2)); 

countThreshold = ceil(classificationRate*0.2);
probThreshold = single(0.7);

audioDeviceReader (Audio Toolbox)オブジェクトを作成し、デバイスからオーディオを読み取ります。dsp.AsyncBuffer (DSP System Toolbox)オブジェクトを作成し、オーディオをチャンクにバッファリングします。

adr = audioDeviceReader('SampleRate',fs,'SamplesPerFrame',samplesPerCapture,'OutputDataType','single');
audioBuffer = dsp.AsyncBuffer(fs);

dsp.MatrixViewer (DSP System Toolbox)オブジェクトおよびtimescope (DSP System Toolbox)オブジェクトを作成し、結果を表示します。

matrixViewer = dsp.MatrixViewer("ColorBarLabel","Power per band (dB/Band)", ...
    "XLabel","Frames", ...
    "YLabel","Bark Bands", ...
    "Position",[400 100 600 250], ...
    "ColorLimits",[-4 2.6445], ...
    "AxisOrigin",'Lower left corner', ...
    "Name","Speech Command Recognition Using Deep Learning");

timeScope = timescope('SampleRate', fs, ...
    'YLimits',[-1 1], 'Position', [400 380 600 250], ...
    'Name','Speech Command Recognition Using Deep Learning', ...
    'TimeSpanSource','Property', ...
    'TimeSpan',1, ...
    'BufferLength',fs);

timeScope.YLabel = 'Amplitude';
timeScope.ShowGrid = true;

時間スコープおよび行列ビューアーを表示します。時間スコープおよび行列ビューアーの両方が開いているか、制限時間に達するまで、コマンドを検出します。制限時間に達する前にライブ検出を停止するには、時間スコープ ウィンドウまたは行列ビューアー ウィンドウを閉じます。

show(timeScope)
show(matrixViewer)
timeLimit = 10;

tic
while isVisible(timeScope) && isVisible(matrixViewer) && toc < timeLimit
    %% Capture Audio
    x = adr();
    write(audioBuffer,x);
    y = read(audioBuffer,fs,fs-samplesPerCapture);
    
    % Compute auditory features
    features = extract(afe,y);
    auditory_features = log10(features + 1e-6);
    
    % Transpose to get the auditory spectrum
    auditorySpectrum = auditory_features';
    
    % Perform prediction
    probs = predict(trainedNet, auditory_features);      
    [~, YPredicted] = max(probs);
    
    % Perform statistical post processing
    YBuffer = [YBuffer(2:end),YPredicted];
    probBuffer = [probBuffer(:,2:end),probs(:)];

    [YMode_idx, count] = mode(YBuffer);
    count = single(count);
    maxProb = max(probBuffer(YMode_idx,:));

    if (YMode_idx == single(backgroundIdx) || count < countThreshold || maxProb < probThreshold)
        speechCommandIdx = backgroundIdx;
    else
        speechCommandIdx = YMode_idx;
    end
    
    % Update plots
    matrixViewer(auditorySpectrum);
    timeScope(x);

    if (speechCommandIdx == backgroundIdx)
        timeScope.Title = ' ';
    else
        timeScope.Title = char(labels(speechCommandIdx));
    end
    drawnow
end 

スコープを非表示にします。

hide(matrixViewer)
hide(timeScope)

MATLAB コードの展開準備

コード生成と互換性がある特徴抽出を実行する関数を作成するには、audioFeatureExtractor オブジェクトでgenerateMATLABFunction (Audio Toolbox)を呼び出します。オブジェクト関数 generateMATLABFunction は、コード生成と互換性があり、同等の特徴抽出を実行するスタンドアロン関数を作成します。

generateMATLABFunction(afe,'extractSpeechFeatures')

サポート関数 HelperSpeechCommandRecognition は、以前に説明した特徴抽出およびネットワーク予測プロセスをカプセル化します。特徴抽出はコード生成と互換性があるため、特徴抽出は生成された関数 extractSpeechFeatures によって処理されます。ネットワークはコード生成と互換性があるため、サポート関数は関数coder.loadDeepLearningNetwork (MATLAB Coder)を使用してネットワークを読み込みます。

関数 HelperSpeechCommandRecognition を使用し、音声コマンドのライブ検出を実行します。

show(timeScope)
show(matrixViewer)
timeLimit = 10;

tic
while isVisible(timeScope) && isVisible(matrixViewer) && toc < timeLimit
    x = adr();    
        
    [speechCommandIdx, auditorySpectrum] = HelperSpeechCommandRecognition(x);  
		
    matrixViewer(auditorySpectrum);
    timeScope(x);
   
    if (speechCommandIdx == backgroundIdx)
        timeScope.Title = ' ';
    else
        timeScope.Title = char(labels(speechCommandIdx));
    end
    drawnow
end

スコープを非表示にします。

hide(timeScope)
hide(matrixViewer)

MATLAB 実行可能ファイルの生成

実行可能プログラムの生成用にコード生成構成オブジェクトを作成します。ターゲット言語を C++ に指定します。

cfg = coder.config('mex');
cfg.TargetLang = 'C++';

MKL-DNN ライブラリで深層学習コード生成用の構成オブジェクトを作成します。コード生成構成オブジェクトに構成オブジェクトを追加します。

dlcfg = coder.DeepLearningConfig('mkldnn');
cfg.DeepLearningConfig = dlcfg;

codegen (MATLAB Coder)を呼び出し、関数 HelperSpeechCommandRecognition 用の C++ コードを生成します。構成オブジェクトとプロトタイプの引数を指定します。HelperSpeechCommandRecognition_mex という名前の MEX ファイルが現在のフォルダーに生成されます。

codegen HelperSpeechCommandRecognition -config cfg -args {rand(samplesPerCapture, 1, 'single')} -profile -report -v
### Compiling function(s) HelperSpeechCommandRecognition ...
------------------------------------------------------------------------
[1/45] cl /c /Zp8 /GR /W3 /EHs /nologo /MD /D_CRT_SECURE_NO_DEPRECATE /D_SCL_SECURE_NO_DEPRECATE /D_SECURE_SCL=0   /DMATLAB_MEX_FILE  /DMATLAB_MEX_FILE /O2 /Oy- /DNDEBUG /fp:strict /source-charset:utf-8 /I "." /I "C:\ExampleMatlab\ExampleManager\sporwal.Bdoc21b.j1648568\deeplearning_shared-ex90506783" /I "Z:\32\sporwal.Bdoc21b.j1648568\matlab\extern\include\mkldnn" /I ".\interface" /I "Z:\32\sporwal.Bdoc21b.j1648568\matlab\extern\include" /I "." -DMODEL=HelperSpeechCommandRecognition_mex -DMW_NEEDS_VERSION_H /wd4251  MWTensorBase.cpp /Fobuild\win64\MWTensorBase.obj
MWTensorBase.cpp
[2/45] cl /c /Zp8 /GR /W3 /EHs /nologo /MD /D_CRT_SECURE_NO_DEPRECATE /D_SCL_SECURE_NO_DEPRECATE /D_SECURE_SCL=0   /DMATLAB_MEX_FILE  /DMATLAB_MEX_FILE /O2 /Oy- /DNDEBUG /fp:strict /source-charset:utf-8 /I "." /I "C:\ExampleMatlab\ExampleManager\sporwal.Bdoc21b.j1648568\deeplearning_shared-ex90506783" /I "Z:\32\sporwal.Bdoc21b.j1648568\matlab\extern\include\mkldnn" /I ".\interface" /I "Z:\32\sporwal.Bdoc21b.j1648568\matlab\extern\include" /I "." -DMODEL=HelperSpeechCommandRecognition_mex -DMW_NEEDS_VERSION_H /wd4251  MWElementwiseAffineLayer.cpp /Fobuild\win64\MWElementwiseAffineLayer.obj
MWElementwiseAffineLayer.cpp
[3/45] cl /c /Zp8 /GR /W3 /EHs /nologo /MD /D_CRT_SECURE_NO_DEPRECATE /D_SCL_SECURE_NO_DEPRECATE /D_SECURE_SCL=0   /DMATLAB_MEX_FILE  /DMATLAB_MEX_FILE /O2 /Oy- /DNDEBUG /fp:strict /source-charset:utf-8 /I "." /I "C:\ExampleMatlab\ExampleManager\sporwal.Bdoc21b.j1648568\deeplearning_shared-ex90506783" /I "Z:\32\sporwal.Bdoc21b.j1648568\matlab\extern\include\mkldnn" /I ".\interface" /I "Z:\32\sporwal.Bdoc21b.j1648568\matlab\extern\include" /I "." -DMODEL=HelperSpeechCommandRecognition_mex -DMW_NEEDS_VERSION_H /wd4251  MWMaxPoolingLayer.cpp /Fobuild\win64\MWMaxPoolingLayer.obj
MWMaxPoolingLayer.cpp
[4/45] cl /c /Zp8 /GR /W3 /EHs /nologo /MD /D_CRT_SECURE_NO_DEPRECATE /D_SCL_SECURE_NO_DEPRECATE /D_SECURE_SCL=0   /DMATLAB_MEX_FILE  /DMATLAB_MEX_FILE /O2 /Oy- /DNDEBUG /fp:strict /source-charset:utf-8 /I "." /I "C:\ExampleMatlab\ExampleManager\sporwal.Bdoc21b.j1648568\deeplearning_shared-ex90506783" /I "Z:\32\sporwal.Bdoc21b.j1648568\matlab\extern\include\mkldnn" /I ".\interface" /I "Z:\32\sporwal.Bdoc21b.j1648568\matlab\extern\include" /I "." -DMODEL=HelperSpeechCommandRecognition_mex -DMW_NEEDS_VERSION_H /wd4251  MWInputLayerImpl.cpp /Fobuild\win64\MWInputLayerImpl.obj
MWInputLayerImpl.cpp
[5/45] cl /c /Zp8 /GR /W3 /EHs /nologo /MD /D_CRT_SECURE_NO_DEPRECATE /D_SCL_SECURE_NO_DEPRECATE /D_SECURE_SCL=0   /DMATLAB_MEX_FILE  /DMATLAB_MEX_FILE /O2 /Oy- /DNDEBUG /fp:strict /source-charset:utf-8 /I "." /I "C:\ExampleMatlab\ExampleManager\sporwal.Bdoc21b.j1648568\deeplearning_shared-ex90506783" /I "Z:\32\sporwal.Bdoc21b.j1648568\matlab\extern\include\mkldnn" /I ".\interface" /I "Z:\32\sporwal.Bdoc21b.j1648568\matlab\extern\include" /I "." -DMODEL=HelperSpeechCommandRecognition_mex -DMW_NEEDS_VERSION_H /wd4251  MWInputLayer.cpp /Fobuild\win64\MWInputLayer.obj
MWInputLayer.cpp
[6/45] cl /c /Zp8 /GR /W3 /EHs /nologo /MD /D_CRT_SECURE_NO_DEPRECATE /D_SCL_SECURE_NO_DEPRECATE /D_SECURE_SCL=0   /DMATLAB_MEX_FILE  /DMATLAB_MEX_FILE /O2 /Oy- /DNDEBUG /fp:strict /source-charset:utf-8 /I "." /I "C:\ExampleMatlab\ExampleManager\sporwal.Bdoc21b.j1648568\deeplearning_shared-ex90506783" /I "Z:\32\sporwal.Bdoc21b.j1648568\matlab\extern\include\mkldnn" /I ".\interface" /I "Z:\32\sporwal.Bdoc21b.j1648568\matlab\extern\include" /I "." -DMODEL=HelperSpeechCommandRecognition_mex -DMW_NEEDS_VERSION_H /wd4251  MWOutputLayer.cpp /Fobuild\win64\MWOutputLayer.obj
MWOutputLayer.cpp
[7/45] cl /c /Zp8 /GR /W3 /EHs /nologo /MD /D_CRT_SECURE_NO_DEPRECATE /D_SCL_SECURE_NO_DEPRECATE /D_SECURE_SCL=0   /DMATLAB_MEX_FILE  /DMATLAB_MEX_FILE /O2 /Oy- /DNDEBUG /fp:strict /source-charset:utf-8 /I "." /I "C:\ExampleMatlab\ExampleManager\sporwal.Bdoc21b.j1648568\deeplearning_shared-ex90506783" /I "Z:\32\sporwal.Bdoc21b.j1648568\matlab\extern\include\mkldnn" /I ".\interface" /I "Z:\32\sporwal.Bdoc21b.j1648568\matlab\extern\include" /I "." -DMODEL=HelperSpeechCommandRecognition_mex -DMW_NEEDS_VERSION_H /wd4251  MWFCLayer.cpp /Fobuild\win64\MWFCLayer.obj
MWFCLayer.cpp
[8/45] cl /c /Zp8 /GR /W3 /EHs /nologo /MD /D_CRT_SECURE_NO_DEPRECATE /D_SCL_SECURE_NO_DEPRECATE /D_SECURE_SCL=0   /DMATLAB_MEX_FILE  /DMATLAB_MEX_FILE /O2 /Oy- /DNDEBUG /fp:strict /source-charset:utf-8 /I "." /I "C:\ExampleMatlab\ExampleManager\sporwal.Bdoc21b.j1648568\deeplearning_shared-ex90506783" /I "Z:\32\sporwal.Bdoc21b.j1648568\matlab\extern\include\mkldnn" /I ".\interface" /I "Z:\32\sporwal.Bdoc21b.j1648568\matlab\extern\include" /I "." -DMODEL=HelperSpeechCommandRecognition_mex -DMW_NEEDS_VERSION_H /wd4251  MWCNNLayer.cpp /Fobuild\win64\MWCNNLayer.obj
MWCNNLayer.cpp
[9/45] cl /c /Zp8 /GR /W3 /EHs /nologo /MD /D_CRT_SECURE_NO_DEPRECATE /D_SCL_SECURE_NO_DEPRECATE /D_SECURE_SCL=0   /DMATLAB_MEX_FILE  /DMATLAB_MEX_FILE /O2 /Oy- /DNDEBUG /fp:strict /source-charset:utf-8 /I "." /I "C:\ExampleMatlab\ExampleManager\sporwal.Bdoc21b.j1648568\deeplearning_shared-ex90506783" /I "Z:\32\sporwal.Bdoc21b.j1648568\matlab\extern\include\mkldnn" /I ".\interface" /I "Z:\32\sporwal.Bdoc21b.j1648568\matlab\extern\include" /I "." -DMODEL=HelperSpeechCommandRecognition_mex -DMW_NEEDS_VERSION_H /wd4251  MWOutputLayerImpl.cpp /Fobuild\win64\MWOutputLayerImpl.obj
MWOutputLayerImpl.cpp
[10/45] cl /c /Zp8 /GR /W3 /EHs /nologo /MD /D_CRT_SECURE_NO_DEPRECATE /D_SCL_SECURE_NO_DEPRECATE /D_SECURE_SCL=0   /DMATLAB_MEX_FILE  /DMATLAB_MEX_FILE /O2 /Oy- /DNDEBUG /fp:strict /source-charset:utf-8 /I "." /I "C:\ExampleMatlab\ExampleManager\sporwal.Bdoc21b.j1648568\deeplearning_shared-ex90506783" /I "Z:\32\sporwal.Bdoc21b.j1648568\matlab\extern\include\mkldnn" /I ".\interface" /I "Z:\32\sporwal.Bdoc21b.j1648568\matlab\extern\include" /I "." -DMODEL=HelperSpeechCommandRecognition_mex -DMW_NEEDS_VERSION_H /wd4251  MWFusedConvReLULayer.cpp /Fobuild\win64\MWFusedConvReLULayer.obj
MWFusedConvReLULayer.cpp
[11/45] cl /c /Zp8 /GR /W3 /EHs /nologo /MD /D_CRT_SECURE_NO_DEPRECATE /D_SCL_SECURE_NO_DEPRECATE /D_SECURE_SCL=0   /DMATLAB_MEX_FILE  /DMATLAB_MEX_FILE /O2 /Oy- /DNDEBUG /fp:strict /source-charset:utf-8 /I "." /I "C:\ExampleMatlab\ExampleManager\sporwal.Bdoc21b.j1648568\deeplearning_shared-ex90506783" /I "Z:\32\sporwal.Bdoc21b.j1648568\matlab\extern\include\mkldnn" /I ".\interface" /I "Z:\32\sporwal.Bdoc21b.j1648568\matlab\extern\include" /I "." -DMODEL=HelperSpeechCommandRecognition_mex -DMW_NEEDS_VERSION_H /wd4251  MWMaxPoolingLayerImpl.cpp /Fobuild\win64\MWMaxPoolingLayerImpl.obj
MWMaxPoolingLayerImpl.cpp
[12/45] cl /c /Zp8 /GR /W3 /EHs /nologo /MD /D_CRT_SECURE_NO_DEPRECATE /D_SCL_SECURE_NO_DEPRECATE /D_SECURE_SCL=0   /DMATLAB_MEX_FILE  /DMATLAB_MEX_FILE /O2 /Oy- /DNDEBUG /fp:strict /source-charset:utf-8 /I "." /I "C:\ExampleMatlab\ExampleManager\sporwal.Bdoc21b.j1648568\deeplearning_shared-ex90506783" /I "Z:\32\sporwal.Bdoc21b.j1648568\matlab\extern\include\mkldnn" /I ".\interface" /I "Z:\32\sporwal.Bdoc21b.j1648568\matlab\extern\include" /I "." -DMODEL=HelperSpeechCommandRecognition_mex -DMW_NEEDS_VERSION_H /wd4251  HelperSpeechCommandRecognition_data.cpp /Fobuild\win64\HelperSpeechCommandRecognition_data.obj
HelperSpeechCommandRecognition_data.cpp
[13/45] cl /c /Zp8 /GR /W3 /EHs /nologo /MD /D_CRT_SECURE_NO_DEPRECATE /D_SCL_SECURE_NO_DEPRECATE /D_SECURE_SCL=0   /DMATLAB_MEX_FILE  /DMATLAB_MEX_FILE /O2 /Oy- /DNDEBUG /fp:strict /source-charset:utf-8 /I "." /I "C:\ExampleMatlab\ExampleManager\sporwal.Bdoc21b.j1648568\deeplearning_shared-ex90506783" /I "Z:\32\sporwal.Bdoc21b.j1648568\matlab\extern\include\mkldnn" /I ".\interface" /I "Z:\32\sporwal.Bdoc21b.j1648568\matlab\extern\include" /I "." -DMODEL=HelperSpeechCommandRecognition_mex -DMW_NEEDS_VERSION_H /wd4251  HelperSpeechCommandRecognition_terminate.cpp /Fobuild\win64\HelperSpeechCommandRecognition_terminate.obj
HelperSpeechCommandRecognition_terminate.cpp
[14/45] cl /c /Zp8 /GR /W3 /EHs /nologo /MD /D_CRT_SECURE_NO_DEPRECATE /D_SCL_SECURE_NO_DEPRECATE /D_SECURE_SCL=0   /DMATLAB_MEX_FILE  /DMATLAB_MEX_FILE /O2 /Oy- /DNDEBUG /fp:strict /source-charset:utf-8 /I "." /I "C:\ExampleMatlab\ExampleManager\sporwal.Bdoc21b.j1648568\deeplearning_shared-ex90506783" /I "Z:\32\sporwal.Bdoc21b.j1648568\matlab\extern\include\mkldnn" /I ".\interface" /I "Z:\32\sporwal.Bdoc21b.j1648568\matlab\extern\include" /I "." -DMODEL=HelperSpeechCommandRecognition_mex -DMW_NEEDS_VERSION_H /wd4251  colon.cpp /Fobuild\win64\colon.obj
colon.cpp
[15/45] cl /c /Zp8 /GR /W3 /EHs /nologo /MD /D_CRT_SECURE_NO_DEPRECATE /D_SCL_SECURE_NO_DEPRECATE /D_SECURE_SCL=0   /DMATLAB_MEX_FILE  /DMATLAB_MEX_FILE /O2 /Oy- /DNDEBUG /fp:strict /source-charset:utf-8 /I "." /I "C:\ExampleMatlab\ExampleManager\sporwal.Bdoc21b.j1648568\deeplearning_shared-ex90506783" /I "Z:\32\sporwal.Bdoc21b.j1648568\matlab\extern\include\mkldnn" /I ".\interface" /I "Z:\32\sporwal.Bdoc21b.j1648568\matlab\extern\include" /I "." -DMODEL=HelperSpeechCommandRecognition_mex -DMW_NEEDS_VERSION_H /wd4251  HelperSpeechCommandRecognition_initialize.cpp /Fobuild\win64\HelperSpeechCommandRecognition_initialize.obj
HelperSpeechCommandRecognition_initialize.cpp
[16/45] cl /c /Zp8 /GR /W3 /EHs /nologo /MD /D_CRT_SECURE_NO_DEPRECATE /D_SCL_SECURE_NO_DEPRECATE /D_SECURE_SCL=0   /DMATLAB_MEX_FILE  /DMATLAB_MEX_FILE /O2 /Oy- /DNDEBUG /fp:strict /source-charset:utf-8 /I "." /I "C:\ExampleMatlab\ExampleManager\sporwal.Bdoc21b.j1648568\deeplearning_shared-ex90506783" /I "Z:\32\sporwal.Bdoc21b.j1648568\matlab\extern\include\mkldnn" /I ".\interface" /I "Z:\32\sporwal.Bdoc21b.j1648568\matlab\extern\include" /I "." -DMODEL=HelperSpeechCommandRecognition_mex -DMW_NEEDS_VERSION_H /wd4251  MWElementwiseAffineLayerImpl.cpp /Fobuild\win64\MWElementwiseAffineLayerImpl.obj
MWElementwiseAffineLayerImpl.cpp
[17/45] cl /c /Zp8 /GR /W3 /EHs /nologo /MD /D_CRT_SECURE_NO_DEPRECATE /D_SCL_SECURE_NO_DEPRECATE /D_SECURE_SCL=0   /DMATLAB_MEX_FILE  /DMATLAB_MEX_FILE /O2 /Oy- /DNDEBUG /fp:strict /source-charset:utf-8 /I "." /I "C:\ExampleMatlab\ExampleManager\sporwal.Bdoc21b.j1648568\deeplearning_shared-ex90506783" /I "Z:\32\sporwal.Bdoc21b.j1648568\matlab\extern\include\mkldnn" /I ".\interface" /I "Z:\32\sporwal.Bdoc21b.j1648568\matlab\extern\include" /I "." -DMODEL=HelperSpeechCommandRecognition_mex -DMW_NEEDS_VERSION_H /wd4251  rt_nonfinite.cpp /Fobuild\win64\rt_nonfinite.obj
rt_nonfinite.cpp
[18/45] cl /c /Zp8 /GR /W3 /EHs /nologo /MD /D_CRT_SECURE_NO_DEPRECATE /D_SCL_SECURE_NO_DEPRECATE /D_SECURE_SCL=0   /DMATLAB_MEX_FILE  /DMATLAB_MEX_FILE /O2 /Oy- /DNDEBUG /fp:strict /source-charset:utf-8 /I "." /I "C:\ExampleMatlab\ExampleManager\sporwal.Bdoc21b.j1648568\deeplearning_shared-ex90506783" /I "Z:\32\sporwal.Bdoc21b.j1648568\matlab\extern\include\mkldnn" /I ".\interface" /I "Z:\32\sporwal.Bdoc21b.j1648568\matlab\extern\include" /I "." -DMODEL=HelperSpeechCommandRecognition_mex -DMW_NEEDS_VERSION_H /wd4251  MWFCLayerImpl.cpp /Fobuild\win64\MWFCLayerImpl.obj
MWFCLayerImpl.cpp
[19/45] cl /c /Zp8 /GR /W3 /EHs /nologo /MD /D_CRT_SECURE_NO_DEPRECATE /D_SCL_SECURE_NO_DEPRECATE /D_SECURE_SCL=0   /DMATLAB_MEX_FILE  /DMATLAB_MEX_FILE /O2 /Oy- /DNDEBUG /fp:strict /source-charset:utf-8 /I "." /I "C:\ExampleMatlab\ExampleManager\sporwal.Bdoc21b.j1648568\deeplearning_shared-ex90506783" /I "Z:\32\sporwal.Bdoc21b.j1648568\matlab\extern\include\mkldnn" /I ".\interface" /I "Z:\32\sporwal.Bdoc21b.j1648568\matlab\extern\include" /I "." -DMODEL=HelperSpeechCommandRecognition_mex -DMW_NEEDS_VERSION_H /wd4251  MWFusedConvReLULayerImpl.cpp /Fobuild\win64\MWFusedConvReLULayerImpl.obj
MWFusedConvReLULayerImpl.cpp
[20/45] cl /c /Zp8 /GR /W3 /EHs /nologo /MD /D_CRT_SECURE_NO_DEPRECATE /D_SCL_SECURE_NO_DEPRECATE /D_SECURE_SCL=0   /DMATLAB_MEX_FILE  /DMATLAB_MEX_FILE /O2 /Oy- /DNDEBUG /fp:strict /source-charset:utf-8 /I "." /I "C:\ExampleMatlab\ExampleManager\sporwal.Bdoc21b.j1648568\deeplearning_shared-ex90506783" /I "Z:\32\sporwal.Bdoc21b.j1648568\matlab\extern\include\mkldnn" /I ".\interface" /I "Z:\32\sporwal.Bdoc21b.j1648568\matlab\extern\include" /I "." -DMODEL=HelperSpeechCommandRecognition_mex -DMW_NEEDS_VERSION_H /wd4251  eml_int_forloop_overflow_check.cpp /Fobuild\win64\eml_int_forloop_overflow_check.obj
eml_int_forloop_overflow_check.cpp
[21/45] cl /c /Zp8 /GR /W3 /EHs /nologo /MD /D_CRT_SECURE_NO_DEPRECATE /D_SCL_SECURE_NO_DEPRECATE /D_SECURE_SCL=0   /DMATLAB_MEX_FILE  /DMATLAB_MEX_FILE /O2 /Oy- /DNDEBUG /fp:strict /source-charset:utf-8 /I "." /I "C:\ExampleMatlab\ExampleManager\sporwal.Bdoc21b.j1648568\deeplearning_shared-ex90506783" /I "Z:\32\sporwal.Bdoc21b.j1648568\matlab\extern\include\mkldnn" /I ".\interface" /I "Z:\32\sporwal.Bdoc21b.j1648568\matlab\extern\include" /I "." -DMODEL=HelperSpeechCommandRecognition_mex -DMW_NEEDS_VERSION_H /wd4251  MWSoftmaxLayerImpl.cpp /Fobuild\win64\MWSoftmaxLayerImpl.obj
MWSoftmaxLayerImpl.cpp
[22/45] cl /c /Zp8 /GR /W3 /EHs /nologo /MD /D_CRT_SECURE_NO_DEPRECATE /D_SCL_SECURE_NO_DEPRECATE /D_SECURE_SCL=0   /DMATLAB_MEX_FILE  /DMATLAB_MEX_FILE /O2 /Oy- /DNDEBUG /fp:strict /source-charset:utf-8 /I "." /I "C:\ExampleMatlab\ExampleManager\sporwal.Bdoc21b.j1648568\deeplearning_shared-ex90506783" /I "Z:\32\sporwal.Bdoc21b.j1648568\matlab\extern\include\mkldnn" /I ".\interface" /I "Z:\32\sporwal.Bdoc21b.j1648568\matlab\extern\include" /I "." -DMODEL=HelperSpeechCommandRecognition_mex -DMW_NEEDS_VERSION_H /wd4251  stft.cpp /Fobuild\win64\stft.obj
stft.cpp
[23/45] cl /c /Zp8 /GR /W3 /EHs /nologo /MD /D_CRT_SECURE_NO_DEPRECATE /D_SCL_SECURE_NO_DEPRECATE /D_SECURE_SCL=0   /DMATLAB_MEX_FILE  /DMATLAB_MEX_FILE /O2 /Oy- /DNDEBUG /fp:strict /source-charset:utf-8 /I "." /I "C:\ExampleMatlab\ExampleManager\sporwal.Bdoc21b.j1648568\deeplearning_shared-ex90506783" /I "Z:\32\sporwal.Bdoc21b.j1648568\matlab\extern\include\mkldnn" /I ".\interface" /I "Z:\32\sporwal.Bdoc21b.j1648568\matlab\extern\include" /I "." -DMODEL=HelperSpeechCommandRecognition_mex -DMW_NEEDS_VERSION_H /wd4251  sort.cpp /Fobuild\win64\sort.obj
sort.cpp
[24/45] cl /c /Zp8 /GR /W3 /EHs /nologo /MD /D_CRT_SECURE_NO_DEPRECATE /D_SCL_SECURE_NO_DEPRECATE /D_SECURE_SCL=0   /DMATLAB_MEX_FILE  /DMATLAB_MEX_FILE /O2 /Oy- /DNDEBUG /fp:strict /source-charset:utf-8 /I "." /I "C:\ExampleMatlab\ExampleManager\sporwal.Bdoc21b.j1648568\deeplearning_shared-ex90506783" /I "Z:\32\sporwal.Bdoc21b.j1648568\matlab\extern\include\mkldnn" /I ".\interface" /I "Z:\32\sporwal.Bdoc21b.j1648568\matlab\extern\include" /I "." -DMODEL=HelperSpeechCommandRecognition_mex -DMW_NEEDS_VERSION_H /wd4251  MWSoftmaxLayer.cpp /Fobuild\win64\MWSoftmaxLayer.obj
MWSoftmaxLayer.cpp
[25/45] cl /c /Zp8 /GR /W3 /EHs /nologo /MD /D_CRT_SECURE_NO_DEPRECATE /D_SCL_SECURE_NO_DEPRECATE /D_SECURE_SCL=0   /DMATLAB_MEX_FILE  /DMATLAB_MEX_FILE /O2 /Oy- /DNDEBUG /fp:strict /source-charset:utf-8 /I "." /I "C:\ExampleMatlab\ExampleManager\sporwal.Bdoc21b.j1648568\deeplearning_shared-ex90506783" /I "Z:\32\sporwal.Bdoc21b.j1648568\matlab\extern\include\mkldnn" /I ".\interface" /I "Z:\32\sporwal.Bdoc21b.j1648568\matlab\extern\include" /I "." -DMODEL=HelperSpeechCommandRecognition_mex -DMW_NEEDS_VERSION_H /wd4251  extractSpeechFeatures.cpp /Fobuild\win64\extractSpeechFeatures.obj
extractSpeechFeatures.cpp
[26/45] cl /c /Zp8 /GR /W3 /EHs /nologo /MD /D_CRT_SECURE_NO_DEPRECATE /D_SCL_SECURE_NO_DEPRECATE /D_SECURE_SCL=0   /DMATLAB_MEX_FILE  /DMATLAB_MEX_FILE /O2 /Oy- /DNDEBUG /fp:strict /source-charset:utf-8 /I "." /I "C:\ExampleMatlab\ExampleManager\sporwal.Bdoc21b.j1648568\deeplearning_shared-ex90506783" /I "Z:\32\sporwal.Bdoc21b.j1648568\matlab\extern\include\mkldnn" /I ".\interface" /I "Z:\32\sporwal.Bdoc21b.j1648568\matlab\extern\include" /I "." -DMODEL=HelperSpeechCommandRecognition_mex -DMW_NEEDS_VERSION_H /wd4251  HelperSpeechCommandRecognition.cpp /Fobuild\win64\HelperSpeechCommandRecognition.obj
HelperSpeechCommandRecognition.cpp
[27/45] cl /c /Zp8 /GR /W3 /EHs /nologo /MD /D_CRT_SECURE_NO_DEPRECATE /D_SCL_SECURE_NO_DEPRECATE /D_SECURE_SCL=0   /DMATLAB_MEX_FILE  /DMATLAB_MEX_FILE /O2 /Oy- /DNDEBUG /fp:strict /source-charset:utf-8 /I "." /I "C:\ExampleMatlab\ExampleManager\sporwal.Bdoc21b.j1648568\deeplearning_shared-ex90506783" /I "Z:\32\sporwal.Bdoc21b.j1648568\matlab\extern\include\mkldnn" /I ".\interface" /I "Z:\32\sporwal.Bdoc21b.j1648568\matlab\extern\include" /I "." -DMODEL=HelperSpeechCommandRecognition_mex -DMW_NEEDS_VERSION_H /wd4251  DeepLearningNetwork.cpp /Fobuild\win64\DeepLearningNetwork.obj
DeepLearningNetwork.cpp
[28/45] cl /c /Zp8 /GR /W3 /EHs /nologo /MD /D_CRT_SECURE_NO_DEPRECATE /D_SCL_SECURE_NO_DEPRECATE /D_SECURE_SCL=0   /DMATLAB_MEX_FILE  /DMATLAB_MEX_FILE /O2 /Oy- /DNDEBUG /fp:strict /source-charset:utf-8 /I "." /I "C:\ExampleMatlab\ExampleManager\sporwal.Bdoc21b.j1648568\deeplearning_shared-ex90506783" /I "Z:\32\sporwal.Bdoc21b.j1648568\matlab\extern\include\mkldnn" /I ".\interface" /I "Z:\32\sporwal.Bdoc21b.j1648568\matlab\extern\include" /I "." -DMODEL=HelperSpeechCommandRecognition_mex -DMW_NEEDS_VERSION_H /wd4251  sortIdx.cpp /Fobuild\win64\sortIdx.obj
sortIdx.cpp
[29/45] cl /c /Zp8 /GR /W3 /EHs /nologo /MD /D_CRT_SECURE_NO_DEPRECATE /D_SCL_SECURE_NO_DEPRECATE /D_SECURE_SCL=0   /DMATLAB_MEX_FILE  /DMATLAB_MEX_FILE /O2 /Oy- /DNDEBUG /fp:strict /source-charset:utf-8 /I "." /I "C:\ExampleMatlab\ExampleManager\sporwal.Bdoc21b.j1648568\deeplearning_shared-ex90506783" /I "Z:\32\sporwal.Bdoc21b.j1648568\matlab\extern\include\mkldnn" /I ".\interface" /I "Z:\32\sporwal.Bdoc21b.j1648568\matlab\extern\include" /I "." -DMODEL=HelperSpeechCommandRecognition_mex -DMW_NEEDS_VERSION_H /wd4251  interface\_coder_HelperSpeechCommandRecognition_api.cpp /Fobuild\win64\_coder_HelperSpeechCommandRecognition_api.obj
_coder_HelperSpeechCommandRecognition_api.cpp
[30/45] cl /c /Zp8 /GR /W3 /EHs /nologo /MD /D_CRT_SECURE_NO_DEPRECATE /D_SCL_SECURE_NO_DEPRECATE /D_SECURE_SCL=0   /DMATLAB_MEX_FILE  /DMATLAB_MEX_FILE /O2 /Oy- /DNDEBUG /fp:strict /source-charset:utf-8 /I "." /I "C:\ExampleMatlab\ExampleManager\sporwal.Bdoc21b.j1648568\deeplearning_shared-ex90506783" /I "Z:\32\sporwal.Bdoc21b.j1648568\matlab\extern\include\mkldnn" /I ".\interface" /I "Z:\32\sporwal.Bdoc21b.j1648568\matlab\extern\include" /I "." -DMODEL=HelperSpeechCommandRecognition_mex -DMW_NEEDS_VERSION_H /wd4251  MWCNNLayerImpl.cpp /Fobuild\win64\MWCNNLayerImpl.obj
MWCNNLayerImpl.cpp
[31/45] cl /c /Zp8 /GR /W3 /EHs /nologo /MD /D_CRT_SECURE_NO_DEPRECATE /D_SCL_SECURE_NO_DEPRECATE /D_SECURE_SCL=0   /DMATLAB_MEX_FILE  /DMATLAB_MEX_FILE /O2 /Oy- /DNDEBUG /fp:strict /source-charset:utf-8 /I "." /I "C:\ExampleMatlab\ExampleManager\sporwal.Bdoc21b.j1648568\deeplearning_shared-ex90506783" /I "Z:\32\sporwal.Bdoc21b.j1648568\matlab\extern\include\mkldnn" /I ".\interface" /I "Z:\32\sporwal.Bdoc21b.j1648568\matlab\extern\include" /I "." -DMODEL=HelperSpeechCommandRecognition_mex -DMW_NEEDS_VERSION_H /wd4251  permute.cpp /Fobuild\win64\permute.obj
permute.cpp
[32/45] cl /c /Zp8 /GR /W3 /EHs /nologo /MD /D_CRT_SECURE_NO_DEPRECATE /D_SCL_SECURE_NO_DEPRECATE /D_SECURE_SCL=0   /DMATLAB_MEX_FILE  /DMATLAB_MEX_FILE /O2 /Oy- /DNDEBUG /fp:strict /source-charset:utf-8 /I "." /I "C:\ExampleMatlab\ExampleManager\sporwal.Bdoc21b.j1648568\deeplearning_shared-ex90506783" /I "Z:\32\sporwal.Bdoc21b.j1648568\matlab\extern\include\mkldnn" /I ".\interface" /I "Z:\32\sporwal.Bdoc21b.j1648568\matlab\extern\include" /I "." -DMODEL=HelperSpeechCommandRecognition_mex -DMW_NEEDS_VERSION_H /wd4251  predict.cpp /Fobuild\win64\predict.obj
predict.cpp
[33/45] cl /c /Zp8 /GR /W3 /EHs /nologo /MD /D_CRT_SECURE_NO_DEPRECATE /D_SCL_SECURE_NO_DEPRECATE /D_SECURE_SCL=0   /DMATLAB_MEX_FILE  /DMATLAB_MEX_FILE /O2 /Oy- /DNDEBUG /fp:strict /source-charset:utf-8 /I "." /I "C:\ExampleMatlab\ExampleManager\sporwal.Bdoc21b.j1648568\deeplearning_shared-ex90506783" /I "Z:\32\sporwal.Bdoc21b.j1648568\matlab\extern\include\mkldnn" /I ".\interface" /I "Z:\32\sporwal.Bdoc21b.j1648568\matlab\extern\include" /I "." -DMODEL=HelperSpeechCommandRecognition_mex -DMW_NEEDS_VERSION_H /wd4251  interface\_coder_HelperSpeechCommandRecognition_info.cpp /Fobuild\win64\_coder_HelperSpeechCommandRecognition_info.obj
_coder_HelperSpeechCommandRecognition_info.cpp
[34/45] cl /c /Zp8 /GR /W3 /EHs /nologo /MD /D_CRT_SECURE_NO_DEPRECATE /D_SCL_SECURE_NO_DEPRECATE /D_SECURE_SCL=0   /DMATLAB_MEX_FILE  /DMATLAB_MEX_FILE /O2 /Oy- /DNDEBUG /fp:strict /source-charset:utf-8 /I "." /I "C:\ExampleMatlab\ExampleManager\sporwal.Bdoc21b.j1648568\deeplearning_shared-ex90506783" /I "Z:\32\sporwal.Bdoc21b.j1648568\matlab\extern\include\mkldnn" /I ".\interface" /I "Z:\32\sporwal.Bdoc21b.j1648568\matlab\extern\include" /I "." -DMODEL=HelperSpeechCommandRecognition_mex -DMW_NEEDS_VERSION_H /wd4251  HelperSpeechCommandRecognition_mexutil.cpp /Fobuild\win64\HelperSpeechCommandRecognition_mexutil.obj
HelperSpeechCommandRecognition_mexutil.cpp
[35/45] cl /c /Zp8 /GR /W3 /EHs /nologo /MD /D_CRT_SECURE_NO_DEPRECATE /D_SCL_SECURE_NO_DEPRECATE /D_SECURE_SCL=0   /DMATLAB_MEX_FILE  /DMATLAB_MEX_FILE /O2 /Oy- /DNDEBUG /fp:strict /source-charset:utf-8 /I "." /I "C:\ExampleMatlab\ExampleManager\sporwal.Bdoc21b.j1648568\deeplearning_shared-ex90506783" /I "Z:\32\sporwal.Bdoc21b.j1648568\matlab\extern\include\mkldnn" /I ".\interface" /I "Z:\32\sporwal.Bdoc21b.j1648568\matlab\extern\include" /I "." -DMODEL=HelperSpeechCommandRecognition_mex -DMW_NEEDS_VERSION_H /wd4251  MWTargetNetworkImpl.cpp /Fobuild\win64\MWTargetNetworkImpl.obj
MWTargetNetworkImpl.cpp
[36/45] cl /c /Zp8 /GR /W3 /EHs /nologo /MD /D_CRT_SECURE_NO_DEPRECATE /D_SCL_SECURE_NO_DEPRECATE /D_SECURE_SCL=0   /DMATLAB_MEX_FILE  /DMATLAB_MEX_FILE /O2 /Oy- /DNDEBUG /fp:strict /source-charset:utf-8 /I "." /I "C:\ExampleMatlab\ExampleManager\sporwal.Bdoc21b.j1648568\deeplearning_shared-ex90506783" /I "Z:\32\sporwal.Bdoc21b.j1648568\matlab\extern\include\mkldnn" /I ".\interface" /I "Z:\32\sporwal.Bdoc21b.j1648568\matlab\extern\include" /I "." -DMODEL=HelperSpeechCommandRecognition_mex -DMW_NEEDS_VERSION_H /wd4251  interface\_coder_HelperSpeechCommandRecognition_mex.cpp /Fobuild\win64\_coder_HelperSpeechCommandRecognition_mex.obj
_coder_HelperSpeechCommandRecognition_mex.cpp
[37/45] cl /c /Zp8 /GR /W3 /EHs /nologo /MD /D_CRT_SECURE_NO_DEPRECATE /D_SCL_SECURE_NO_DEPRECATE /D_SECURE_SCL=0   /DMATLAB_MEX_FILE  /DMATLAB_MEX_FILE /O2 /Oy- /DNDEBUG /fp:strict /source-charset:utf-8 /I "." /I "C:\ExampleMatlab\ExampleManager\sporwal.Bdoc21b.j1648568\deeplearning_shared-ex90506783" /I "Z:\32\sporwal.Bdoc21b.j1648568\matlab\extern\include\mkldnn" /I ".\interface" /I "Z:\32\sporwal.Bdoc21b.j1648568\matlab\extern\include" /I "." -DMODEL=HelperSpeechCommandRecognition_mex -DMW_NEEDS_VERSION_H /wd4251  indexShapeCheck.cpp /Fobuild\win64\indexShapeCheck.obj
indexShapeCheck.cpp
[38/45] cl /c /Zp8 /GR /W3 /EHs /nologo /MD /D_CRT_SECURE_NO_DEPRECATE /D_SCL_SECURE_NO_DEPRECATE /D_SECURE_SCL=0   /DMATLAB_MEX_FILE  /DMATLAB_MEX_FILE /O2 /Oy- /DNDEBUG /fp:strict /source-charset:utf-8 /I "." /I "C:\ExampleMatlab\ExampleManager\sporwal.Bdoc21b.j1648568\deeplearning_shared-ex90506783" /I "Z:\32\sporwal.Bdoc21b.j1648568\matlab\extern\include\mkldnn" /I ".\interface" /I "Z:\32\sporwal.Bdoc21b.j1648568\matlab\extern\include" /I "." -DMODEL=HelperSpeechCommandRecognition_mex -DMW_NEEDS_VERSION_H /wd4251  Z:\32\sporwal.Bdoc21b.j1648568\matlab\extern\version\cpp_mexapi_version.cpp /Fobuild\win64\cpp_mexapi_version.obj
cpp_mexapi_version.cpp
[39/45] cl /c /Zp8 /GR /W3 /EHs /nologo /MD /D_CRT_SECURE_NO_DEPRECATE /D_SCL_SECURE_NO_DEPRECATE /D_SECURE_SCL=0   /DMATLAB_MEX_FILE  /DMATLAB_MEX_FILE /O2 /Oy- /DNDEBUG /fp:strict /source-charset:utf-8 /I "." /I "C:\ExampleMatlab\ExampleManager\sporwal.Bdoc21b.j1648568\deeplearning_shared-ex90506783" /I "Z:\32\sporwal.Bdoc21b.j1648568\matlab\extern\include\mkldnn" /I ".\interface" /I "Z:\32\sporwal.Bdoc21b.j1648568\matlab\extern\include" /I "." -DMODEL=HelperSpeechCommandRecognition_mex -DMW_NEEDS_VERSION_H /wd4251  MWCustomLayerForMKLDNN.cpp /Fobuild\win64\MWCustomLayerForMKLDNN.obj
MWCustomLayerForMKLDNN.cpp
[40/45] cl /c /Zp8 /GR /W3 /EHs /nologo /MD /D_CRT_SECURE_NO_DEPRECATE /D_SCL_SECURE_NO_DEPRECATE /D_SECURE_SCL=0   /DMATLAB_MEX_FILE  /DMATLAB_MEX_FILE /O2 /Oy- /DNDEBUG /fp:strict /source-charset:utf-8 /I "." /I "C:\ExampleMatlab\ExampleManager\sporwal.Bdoc21b.j1648568\deeplearning_shared-ex90506783" /I "Z:\32\sporwal.Bdoc21b.j1648568\matlab\extern\include\mkldnn" /I ".\interface" /I "Z:\32\sporwal.Bdoc21b.j1648568\matlab\extern\include" /I "." -DMODEL=HelperSpeechCommandRecognition_mex -DMW_NEEDS_VERSION_H /wd4251  MWMkldnnUtils.cpp /Fobuild\win64\MWMkldnnUtils.obj
MWMkldnnUtils.cpp
[41/45] cl /c /Zp8 /GR /W3 /EHs /nologo /MD /D_CRT_SECURE_NO_DEPRECATE /D_SCL_SECURE_NO_DEPRECATE /D_SECURE_SCL=0   /DMATLAB_MEX_FILE  /DMATLAB_MEX_FILE /O2 /Oy- /DNDEBUG /fp:strict /source-charset:utf-8 /I "." /I "C:\ExampleMatlab\ExampleManager\sporwal.Bdoc21b.j1648568\deeplearning_shared-ex90506783" /I "Z:\32\sporwal.Bdoc21b.j1648568\matlab\extern\include\mkldnn" /I ".\interface" /I "Z:\32\sporwal.Bdoc21b.j1648568\matlab\extern\include" /I "." -DMODEL=HelperSpeechCommandRecognition_mex -DMW_NEEDS_VERSION_H /wd4251  mtimes.cpp /Fobuild\win64\mtimes.obj
mtimes.cpp
[42/45] cl /c /Zp8 /GR /W3 /EHs /nologo /MD /D_CRT_SECURE_NO_DEPRECATE /D_SCL_SECURE_NO_DEPRECATE /D_SECURE_SCL=0   /DMATLAB_MEX_FILE  /DMATLAB_MEX_FILE /O2 /Oy- /DNDEBUG /fp:strict /source-charset:utf-8 /I "." /I "C:\ExampleMatlab\ExampleManager\sporwal.Bdoc21b.j1648568\deeplearning_shared-ex90506783" /I "Z:\32\sporwal.Bdoc21b.j1648568\matlab\extern\include\mkldnn" /I ".\interface" /I "Z:\32\sporwal.Bdoc21b.j1648568\matlab\extern\include" /I "." -DMODEL=HelperSpeechCommandRecognition_mex -DMW_NEEDS_VERSION_H /wd4251  computeDFT.cpp /Fobuild\win64\computeDFT.obj
computeDFT.cpp
[43/45] cl /c /Zp8 /GR /W3 /EHs /nologo /MD /D_CRT_SECURE_NO_DEPRECATE /D_SCL_SECURE_NO_DEPRECATE /D_SECURE_SCL=0   /DMATLAB_MEX_FILE  /DMATLAB_MEX_FILE /O2 /Oy- /DNDEBUG /fp:strict /source-charset:utf-8 /I "." /I "C:\ExampleMatlab\ExampleManager\sporwal.Bdoc21b.j1648568\deeplearning_shared-ex90506783" /I "Z:\32\sporwal.Bdoc21b.j1648568\matlab\extern\include\mkldnn" /I ".\interface" /I "Z:\32\sporwal.Bdoc21b.j1648568\matlab\extern\include" /I "." -DMODEL=HelperSpeechCommandRecognition_mex -DMW_NEEDS_VERSION_H /wd4251  formatSTFTOutput.cpp /Fobuild\win64\formatSTFTOutput.obj
formatSTFTOutput.cpp
[44/45] cl /c /Zp8 /GR /W3 /EHs /nologo /MD /D_CRT_SECURE_NO_DEPRECATE /D_SCL_SECURE_NO_DEPRECATE /D_SECURE_SCL=0   /DMATLAB_MEX_FILE  /DMATLAB_MEX_FILE /O2 /Oy- /DNDEBUG /fp:strict /source-charset:utf-8 /I "." /I "C:\ExampleMatlab\ExampleManager\sporwal.Bdoc21b.j1648568\deeplearning_shared-ex90506783" /I "Z:\32\sporwal.Bdoc21b.j1648568\matlab\extern\include\mkldnn" /I ".\interface" /I "Z:\32\sporwal.Bdoc21b.j1648568\matlab\extern\include" /I "." -DMODEL=HelperSpeechCommandRecognition_mex -DMW_NEEDS_VERSION_H /wd4251  AsyncBuffer.cpp /Fobuild\win64\AsyncBuffer.obj
AsyncBuffer.cpp
[45/45] link build\win64\MWCNNLayer.obj build\win64\MWElementwiseAffineLayer.obj build\win64\MWFCLayer.obj build\win64\MWFusedConvReLULayer.obj build\win64\MWInputLayer.obj build\win64\MWMaxPoolingLayer.obj build\win64\MWOutputLayer.obj build\win64\MWSoftmaxLayer.obj build\win64\MWTensorBase.obj build\win64\MWElementwiseAffineLayerImpl.obj build\win64\MWFCLayerImpl.obj build\win64\MWFusedConvReLULayerImpl.obj build\win64\MWInputLayerImpl.obj build\win64\MWMaxPoolingLayerImpl.obj build\win64\MWOutputLayerImpl.obj build\win64\MWSoftmaxLayerImpl.obj build\win64\MWCNNLayerImpl.obj build\win64\MWTargetNetworkImpl.obj build\win64\MWMkldnnUtils.obj build\win64\MWCustomLayerForMKLDNN.obj build\win64\HelperSpeechCommandRecognition_data.obj build\win64\rt_nonfinite.obj build\win64\HelperSpeechCommandRecognition_initialize.obj build\win64\HelperSpeechCommandRecognition_terminate.obj build\win64\HelperSpeechCommandRecognition.obj build\win64\DeepLearningNetwork.obj build\win64\colon.obj build\win64\extractSpeechFeatures.obj build\win64\stft.obj build\win64\indexShapeCheck.obj build\win64\mtimes.obj build\win64\permute.obj build\win64\predict.obj build\win64\_coder_HelperSpeechCommandRecognition_api.obj build\win64\_coder_HelperSpeechCommandRecognition_mex.obj build\win64\computeDFT.obj build\win64\eml_int_forloop_overflow_check.obj build\win64\formatSTFTOutput.obj build\win64\sort.obj build\win64\sortIdx.obj build\win64\AsyncBuffer.obj build\win64\HelperSpeechCommandRecognition_mexutil.obj build\win64\_coder_HelperSpeechCommandRecognition_info.obj build\win64\cpp_mexapi_version.obj /nologo /manifest   /DLL /LIBPATH:"Z:\32\sporwal.Bdoc21b.j1648568\matlab\extern\lib\win64\microsoft" libmx.lib libmex.lib libmat.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib libMatlabDataArray.lib libMatlabEngine.lib  /out:"HelperSpeechCommandRecognition_mex.mexw64" /LIBPATH:"Z:\32\sporwal.Bdoc21b.j1648568\matlab\bin\win64" /LIBPATH:"Z:\32\sporwal.Bdoc21b.j1648568\matlab\extern\lib\win64\microsoft" libiomp5md.lib libmwblas.lib libemlrt.lib libcovrt.lib libut.lib libmwmathutil.lib  "Z:\32\sporwal.Bdoc21b.j1648568\matlab\lib\win64\mwdnnl.lib"
   Creating library HelperSpeechCommandRecognition_mex.lib and object HelperSpeechCommandRecognition_mex.exp

------------------------------------------------------------------------
### Generating compilation report ...
Code generation successful: View report

展開されたコードを使用した音声コマンド認識の実行

時間スコープおよび行列ビューアーを表示します。時間スコープおよび行列ビューアーの両方が開かれている間、または制限時間に達するまで、生成された MEX を使用してコマンドを検出します。制限時間に達する前にライブ検出を停止するには、時間スコープ ウィンドウまたは行列ビューアー ウィンドウを閉じます。

show(timeScope)
show(matrixViewer)

timeLimit = 20;

tic
while isVisible(timeScope) && isVisible(matrixViewer) && toc < timeLimit
    x = adr();    
        
    [speechCommandIdx, auditorySpectrum] = HelperSpeechCommandRecognition_mex(x);
		
    matrixViewer(auditorySpectrum);
    timeScope(x);
   
    if (speechCommandIdx == backgroundIdx)
        timeScope.Title = ' ';
    else
        timeScope.Title = char(labels(speechCommandIdx));
    end
    drawnow
end

hide(matrixViewer)
hide(timeScope)

MEX 実行時間の評価

tic および toc を使用し、MATLAB でシミュレーションを完全に実行するための実行時間と、MEX 関数の実行時間を比較します。

シミュレーション コードのパフォーマンスを測定します。

testDur = 50e-3;
x = pinknoise(fs*testDur,'single');
numLoops = 100;
tic
for k = 1:numLoops
    [speechCommandIdx, auditory_features] = HelperSpeechCommandRecognition(x);
end
exeTime = toc;
fprintf('SIM execution time per 50 ms of audio = %0.4f ms\n',(exeTime/numLoops)*1000);
SIM execution time per 50 ms of audio = 6.8212 ms

MEX コードのパフォーマンスを測定します。

tic
for k = 1:numLoops
    [speechCommandIdx, auditory_features] = HelperSpeechCommandRecognition_mex(x);
end
exeTimeMex = toc;
fprintf('MEX execution time per 50 ms of audio = %0.4f ms\n',(exeTimeMex/numLoops)*1000);
MEX execution time per 50 ms of audio = 1.3347 ms

MEX 関数を使用し、得られるパフォーマンスを評価します。このパフォーマンス テストは、NVIDIA Quadro P620 (Version 26) GPU と、3.60 GHz で動作する Intel(R) Xeon(R) W-2133 CPU を使用するマシン上で実行されます。

PerformanceGain = exeTime/exeTimeMex
PerformanceGain = 5.1107