9

有人應該添加「net#」作爲標籤。我試圖通過本教程將其變成一個卷積神經網絡,以提高我在Azure的機器學習工作室神經網絡:如何在Azure機器學習中構建卷積神經網絡?

https://gallery.cortanaintelligence.com/Experiment/Neural-Network-Convolution-and-pooling-deep-net-2

礦和教程之間的區別是我在做迴歸35功能和1個標籤,他們正在使用28x28功能和10個標籤進行分類。

我先從基本和第二個示例,並讓他們有工作:

input Data [35]; 

hidden H1 [100] 
    from Data all; 

hidden H2 [100] 
    from H1 all; 

output Result [1] linear 
    from H2 all; 

現在改造卷積我誤解。在這裏的教程和文檔:https://docs.microsoft.com/en-us/azure/machine-learning/machine-learning-azure-ml-netsharp-reference-guide它沒有提到如何計算隱藏層的節點元組值。的教程說:

hidden C1 [5, 12, 12] 
    from Picture convolve { 
    InputShape = [28, 28]; 
    KernelShape = [ 5, 5]; 
    Stride  = [ 2, 2]; 
    MapCount = 5; 
    } 

hidden C2 [50, 4, 4] 
    from C1 convolve { 
    InputShape = [ 5, 12, 12]; 
    KernelShape = [ 1, 5, 5]; 
    Stride  = [ 1, 2, 2]; 
    Sharing  = [ F, T, T]; 
    MapCount = 10; 
    } 

好像[5,12,12]和[50,4,4]彈出與KernalShape,跨度和MapCount沿着沒有在那裏。我如何知道我的示例有哪些值是有效的?我嘗試使用相同的值,但它沒有工作,我有一種感覺,因爲他有一個[28,28]輸入,我有一個[35],我需要2個整數不是3的元組。

I只是試圖與這似乎與教程相關的隨機值:眼下

const { T = true; F = false; } 

input Data [35]; 

hidden C1 [7, 23] 
    from Data convolve { 
    InputShape = [35]; 
    KernelShape = [7]; 
    Stride  = [2]; 
    MapCount = 7; 
    } 

hidden C2 [200, 6] 
    from C1 convolve { 
    InputShape = [ 7, 23]; 
    KernelShape = [ 1, 7]; 
    Stride  = [ 1, 2]; 
    Sharing  = [ F, T]; 
    MapCount = 14; 
    } 

hidden H3 [100] 
    from C2 all; 

output Result [1] linear 
    from H3 all; 

這似乎是不可能調試,因爲唯一的錯誤代碼Azure的機器學習工作室以往給人的是:

Exception":{"ErrorId":"LibraryException","ErrorCode":"1000","ExceptionType":"ModuleException","Message":"Error 1000: TLC library exception: Exception of type 'Microsoft.Numerics.AFxLibraryException' was thrown.","Exception":{"Library":"TLC","ExceptionType":"LibraryException","Message":"Exception of type 'Microsoft.Numerics.AFxLibraryException' was thrown."}}}Error: Error 1000: TLC library exception: Exception of type 'Microsoft.Numerics.AFxLibraryException' was thrown. Process exited with error code -2 

最後我的設置是Azure Machine Learning Setup

感謝您的幫助!

回答

1

用於與給定的內核和步幅35柱長度的輸入正確的網絡定義將被以下:

const { T = true; F = false; } 

input Data [35]; 

hidden C1 [7, 15] 
    from Data convolve { 
    InputShape = [35]; 
    KernelShape = [7]; 
    Stride  = [2]; 
    MapCount = 7; 
    } 

hidden C2 [14, 7, 5] 
    from C1 convolve { 
    InputShape = [ 7, 15]; 
    KernelShape = [ 1, 7]; 
    Stride  = [ 1, 2]; 
    Sharing  = [ F, T]; 
    MapCount = 14; 
    } 

hidden H3 [100] 
    from C2 all; 

output Result [1] linear 
    from H3 all; 

首先,C1 = [7,15]。第一個維度就是MapCount。對於第二維,內核形狀定義了用於掃描輸入列的「窗口」的長度,跨度定義了它在每一步移動的量。因此,內核窗口將覆蓋第1-7,3-9,5-11,...,29-35列,當您計算窗口時,產生第二維15。

接下來,C2 = [14,7,5]。第一個維度再次是MapCount。對於第二和第三維,1乘7內核的「窗口」必須覆蓋7乘15的輸入大小,使用沿着對應維度的1和2的步驟。

請注意,如果您想平坦化輸出,則可以指定[98,5]甚至[490]的C2隱藏層形狀。