我正在尝试使用Neuroph Framework和Eclipse为Android创建一个图像识别应用程序,但我不断收到此错误
(使用2.7框架版本) 03-26 17:05:20.533:E / AndroidRuntime(3107):FATAL EXCEPTION:dataLoader 03-26 17:05:20.533:E / AndroidRuntime(3107):java.lang.NoClassDefFoundError:org.neuroph.core.NeuralNetwork 03-26 17:05:20.533:E / AndroidRuntime(3107):at com.example.meuprojetoandroid1.MainActivity $ 1.run(MainActivity.java:49) 03-26 17:05:20.533:E / AndroidRuntime(3107):at java.lang.Thread.run(Thread.java:856)
(使用2.6框架版本) 03-26 17:05:44.299:E / AndroidRuntime(3478):java.lang.StackOverflowError 03-26 17:05:44.299:E / AndroidRuntime(3478):at java.util.HashMap.get(HashMap.java:298) 03-26 17:05:44.299:E / AndroidRuntime(3478):at java.io.ObjectStreamClass.getReflectionField(ObjectStreamClass.java:190) 03-26 17:05:44.299:E / AndroidRuntime(3478):at java.io.ObjectInputStream.readFieldValues(ObjectInputStream.java:1091) 03-26 17:05:44.299:E / AndroidRuntime(3478):at java.io.ObjectInputStream.defaultReadObject(ObjectInputStream.java:455) 03-26 17:05:44.299:E / AndroidRuntime(3478):at java.util.ArrayList.readObject(ArrayList.java:649) 03-26 17:05:44.299:E / AndroidRuntime(3478):at java.lang.reflect.Method.invokeNative(Native Method) 03-26 17:05:44.299:E / AndroidRuntime(3478):at java.lang.reflect.Method.invoke(Method.java:511) 03-26 17:05:44.299:E / AndroidRuntime(3478):at java.io.ObjectInputStream.readObjectForClass(ObjectInputStream.java:1354) 03-26 17:05:44.299:E / AndroidRuntime(3478):at java.io.ObjectInputStream.readHierarchy(ObjectInputStream.java:1266) 03-26 17:05:44.299:E / AndroidRuntime(3478):at java.io.ObjectInputStream.readNewObject(ObjectInputStream.java:1851) 03-26 17:05:44.299:E / AndroidRuntime(3478):at java.io.ObjectInputStream.readNonPrimitiveContent(ObjectInputStream.java:787) 03-26 17:05:44.299:E / AndroidRuntime(3478):at java.io.ObjectInputStream.readObject(ObjectInputStream.java:1999) 03-26 17:05:44.299:E / AndroidRuntime(3478):at java.io.ObjectInputStream.readObject(ObjectInputStream.java:1956) 03-26 17:05:44.299:E / AndroidRuntime(3478):at java.io.ObjectInputStream.readFieldValues(ObjectInputStream.java:1137) 03-26 17:05:44.299:E / AndroidRuntime(3478):at java.io.ObjectInputStream.defaultReadObject(ObjectInputStream.java:455) 03-26 17:05:44.299:E / AndroidRuntime(3478):at java.io.ObjectInputStream.readObjectForClass(ObjectInputStream.java:1369) 03-26 17:05:44.299:E / AndroidRuntime(3478):at java.io.ObjectInputStream.readHierarchy(ObjectInputStream.java:1266) 03-26 17:05:44.299:E / AndroidRuntime(3478):at java.io.ObjectInputStream.readNewObject(ObjectInputStream.java:1851) 03-26 17:05:44.299:E / AndroidRuntime(3478):at java.io.ObjectInputStream.readNonPrimitiveContent(ObjectInputStream.java:787) 03-26 17:05:44.299:E / AndroidRuntime(3478):at java.io.ObjectInputStream.readObject(ObjectInputStream.java:1999) 03-26 17:05:44.299:E / AndroidRuntime(3478):at java.io.ObjectInputStream.readObject(ObjectInputStream.java:1956) 03-26 17:05:44.299:E / AndroidRuntime(3478):at java.io.ObjectInputStream.readFieldValues(ObjectInputStream.java:1137) 03-26 17:05:44.299:E / AndroidRuntime(3478):at java.io.ObjectInputStream.defaultReadObject(ObjectInputStream.java:455) 03-26 17:05:44.299:E / AndroidRuntime(3478):at java.io.ObjectInputStream.readObjectForClass(ObjectInputStream.java:1369) 03-26 17:05:44.299:E / AndroidRuntime(3478):at java.io.ObjectInputStream.readHierarchy(ObjectInputStream.java:1266) 03-26 17:05:44.299:E / AndroidRuntime(3478):at java.io.ObjectInputStream.readNewObject(ObjectInputStream.java:1851) 03-26 17:05:44.299:E / AndroidRuntime(3478):at java.io.ObjectInputStream.readNonPrimitiveContent(ObjectInputStream.java:787) 03-26 17:05:44.299:E / AndroidRuntime(3478):at java.io.ObjectInputStream.readObject(ObjectInputStream.java:1999) 03-26 17:05:44.299:E / AndroidRuntime(3478):at java.io.ObjectInputStream.readObject(ObjectInputStream.java:1956) 03-26 17:05:44.299:E / AndroidRuntime(3478):at java.util.ArrayList.readObject(ArrayList.java:657) 03-26 17:05:44.299:E / AndroidRuntime(3478):at java.lang.reflect.Method.invokeNative(Native Method) 03-26 17:05:44.299:E / AndroidRuntime(3478):at java.lang.reflect.Method.invoke(Method.java:511) 03-26 17:05:44.299:E / AndroidRuntime(3478):at java.io.ObjectInputStream.readObjectForClass(ObjectInputStream.java:1354) 03-26 17:05:44.299:E / AndroidRuntime(3478):at java.io.ObjectInputStream.readHierarchy(ObjectInputStream.java:1266) 03-26 17:05:44.299:E / AndroidRuntime(3478):at java.io.ObjectInputStream.readNewObject(ObjectInputStream.java:1851) 03-26 17:05:44.299:E / AndroidRuntime(3478):at java.io.ObjectInputStream.readNonPrimitiveContent(ObjectInputStream.java:787) 03-26 17:05:44.299:E / AndroidRuntime(3478):at java.io.ObjectInputStream.readObject(ObjectInputStream.java:1999) 03-26 17:05:44.299:E / AndroidRuntime(3478):at java.io.ObjectInputStream.readObject(ObjectInputStream.java:1956) 03-26 17:05:44.299:E / AndroidRuntime(3478):at java.io.ObjectInputStream.readFieldValues(ObjectInputStream.java:1137) 03-26 17:05:44.299:E / AndroidRuntime(3478):at java.io.ObjectInputStream.defaultReadObject(ObjectInputStream.java:455) 03-26 17:05:44.299:E / AndroidRuntime(3478):at java.io.ObjectInputStream.readObjectForClass(ObjectInputStream.java:1369) 03-26 17:05:44.299:E / AndroidRuntime(3478):at java.io.ObjectInputStream.readHierarchy(ObjectInputStream.java:1266) 03-26 17:05:44.299:E / AndroidRuntime(3478):at java.io.ObjectInputStream.readNewObject(ObjectInputStream.java:1851) 03-26 17:05:44.299:E / AndroidRuntime(3478):at java.io.ObjectInputStream.readNonPrimitiveContent(ObjectInputStream.java:787) 03-26 17:05:44.299:E / AndroidRuntime(3478):at java.io.ObjectInputStream.readObject(ObjectInputStream.java:1999) 03-26 17:05:44.299:E / AndroidRuntime(3478):at java.io.ObjectInputStream.readObject(ObjectInputStream.java:1956) 03-26 17:05:44.299:E / AndroidRuntime(3478):at java.io.ObjectInputStream.readFieldValues(ObjectInputStream.java:1137) 03-26 17:05:44.299:E / AndroidRuntime(3478):at java.io.ObjectInputStream.defaultReadObject(ObjectInputStream.java:455) 03-26 17:05:44.299:E / AndroidRuntime(3478):at java.io.ObjectInputStream.readObjectForClass(ObjectInputStream.java:1369) 03-26 17:05:44.299:E / AndroidRuntime(3478):at java.io.ObjectInputStream.readHierarchy(ObjectInputStream.java:1266) 03-26 17:05:44.299:E / AndroidRuntime(3478):at java.io.ObjectInputStream.readNewObject(ObjectInputStream.java:1851) 03-26 17:05:44.299:E / AndroidRuntime(3478):at java.io.ObjectInputStream.readNonPrimitiveContent(ObjectInputStream.java:787) 03-26 17:05:44.299:E / AndroidRuntime(3478):at java.io.ObjectInputStream.readObject(ObjectInputStream.java:1999) 03-26 17:05:44.299:E / AndroidRuntime(3478):at java.io.ObjectInputStream.readObject(ObjectInputStream.java:1956) 03-26 17:05:44.299:E / AndroidRuntime(3478):at java.util.ArrayList.readObject(ArrayList.java:657) 03-26 17:05:44.299:E / AndroidRuntime(3478):at java.lang.reflect.Method.invokeNative(Native Method) 03-26 17:05:44.299:E / AndroidRuntime(3478):at java
在2.6上,它确实适用于该示例 http://neuroph.sourceforge.net/tutorials/android_image_recognition_using_neuroph.htm
但是当我使用我的教练nnet时,它给了我那个错误...... 我试过训练几个神经网络,但一直得到这个错误...... 我使用2.7和2.6 Neuroph Studio来训练网络...
很抱歉,如果重复这一点,但我也没有找到任何与答案有关的内容......
由于
答案 0 :(得分:0)
重要提示:当您在Android中加载神经网络时,需要在堆叠大小增加的单独线程中执行此操作
new Thread(null, loadDataRunnable, "networkLoader", 32000).start();
或者你会得到一个java.lang.StackOverflowError。