2013-08-22 64 views
2

我有問題訓練神經網絡的圖像分類。基於神經網絡的性能,它似乎不是學習。Encog神經網絡分類圖像:訓練

我基本上在encog-examples(ImageNeuralNetwork)中運行給定的程序來分類一組圖像。以下是示例程序輸出

Training set created 
Added input image:./faces/at33_straight_neutral_open.png; identity: shadesNone 
Added input image:./faces/night/night_up_happy_sunglasses_4.png; identity: shades 
...<more files here>... 
Added input image:./faces/cheyer/cheyer_up_neutral_open_4.png; identity: shadesNone 
Downsampling images... 
Created network: [BasicNetwork: Layers=3] 
Training Beginning... Output patterns=2 
Beginning training... 
Iteration #1 Error:199.591952% elapsed time = 00:00:00 time left = 00:01:00 
Iteration #2 Error:196.384178% elapsed time = 00:00:00 time left = 00:01:00 
Iteration #3 Error:160.422574% elapsed time = 00:00:00 time left = 00:01:00 
... 
Iteration #16 Error:99.733657% elapsed time = 00:00:00 time left = 00:01:00 
... 
Iteration #202 Error:99.489796% elapsed time = 00:00:04 time left = 00:01:00 
... 
Iteration #203 Error:199.605091% elapsed time = 00:00:04 time left = 00:01:00 

正如可以看到的,從NN誤差接近200%,則向閉合錯誤100%振盪。首先,我甚至不確定是否有可能出現100%以上的錯誤,更不用說200%。

下面是包含命令和參數的NN我輸入文件:

CreateTraining: width:16,height:15,type:Brightness 
Input: image:./faces/at33_straight_neutral_open.png, identity:shadesNone 
Input: image:./faces/night/night_up_happy_sunglasses_4.png, identity:shades 
Input: image:./faces/choon/choon_up_angry_open_4.png, identity:shadesNone 
Input: image:./faces/cheyer/cheyer_left_angry_sunglasses_4.png, identity:shades 
<more files...> 
Network: hidden1:10, hidden2:10 
Train: Mode:console, Minutes:1, StrategyError:0.25, StrategyCycles:100 
Whatis: image:./faces/tammo/tammo_right_sad_sunglasses_4.png 
<more files...> 

我最初的猜測是,無論是實際的圖像或理想值不正確送入NN,但我查了輸入(例如輸出我已閱讀的圖像和理想值),並且它們都可以。

現在我的直覺是一些目錄(可能是java庫或輸入文件被讀取)沒有正確設置。下面是我的Eclipse運行配置:

Classpath Tab 
    Bootstrap Entries 
     JRE System Library [jre7] 
    User Entries 
     encog-examples (default classpath) 
      encog-examples 
      encog-core-3.2.0-SNAPSHOT.jar \encog-examples\lib 

順便說一句,我也不能正常運行森林植被例子(要求輸入文件),而我可以運行的月球着陸器和XOR例子(不需要輸入文件)。這加強了我的假設,即我的問題與目錄相關。

任何幫助,非常感謝。謝謝。

回答

0

似乎是錯誤與3.2.0,有同樣的問題 嘗試訓練網絡3.1.0,應該修復它

1

忽略我的帖子上面,3.2.0的作品就好了。

我有同樣的問題,如newind27,網絡似乎沒有學到任何東西,錯誤更改是瘋了。在做了一些更多的研究後,我發現encog有點厭惡那些太白的圖片。

對我而言,解決方案是降低用於網絡學習的圖片的亮度。一種方法(在不破壞原始圖像的情況下)使用RescaleOp類和BufferedImage。

其他可能的(未經測試)解決方案可能會改變在學習過程中被饋送到網絡的圖像的順序。