我有問題訓練神經網絡的圖像分類。基於神經網絡的性能,它似乎不是學習。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例子(不需要輸入文件)。這加強了我的假設,即我的問題與目錄相關。
任何幫助,非常感謝。謝謝。