While changing the input size from 608 to 416 in Yolov3Classifier.java, I am getting the following error
java.lang.IllegalArgumentException: Cannot convert between a TensorFlowLite buffer with 4435968 bytes and a ByteBuffer with 2076672 bytes.
at org.tensorflow.lite.Tensor.throwExceptionIfTypeIsIncompatible(Tensor.java:251)
at org.tensorflow.lite.Tensor.setTo(Tensor.java:110)
at org.tensorflow.lite.NativeInterpreterWrapper.run(NativeInterpreterWrapper.java:145)
at org.tensorflow.lite.Interpreter.runForMultipleInputsOutputs(Interpreter.java:275)
at com.amitshekhar.tflite.Classifier.RecognizeImage(Classifier.java:295)
at com.amitshekhar.tflite.MainActivity$DetectThread.run(MainActivity.java:105)
I have already generated a tflite model corresponding to inputsize 416 and also changed the mOutWidth to this new int[]{13,26,52}. After this I am getting this error still
java.lang.IllegalArgumentException: Cannot copy between a TensorFlowLite tensor with shape [1, 13, 13, 255] and a Java object with shape [1, 13, 13, 3, 85]
Can you please tell me what else I have to do to make this one work (for input size 416)?
While changing the input size from 608 to 416 in Yolov3Classifier.java, I am getting the following error
java.lang.IllegalArgumentException: Cannot convert between a TensorFlowLite buffer with 4435968 bytes and a ByteBuffer with 2076672 bytes. at org.tensorflow.lite.Tensor.throwExceptionIfTypeIsIncompatible(Tensor.java:251) at org.tensorflow.lite.Tensor.setTo(Tensor.java:110) at org.tensorflow.lite.NativeInterpreterWrapper.run(NativeInterpreterWrapper.java:145) at org.tensorflow.lite.Interpreter.runForMultipleInputsOutputs(Interpreter.java:275) at com.amitshekhar.tflite.Classifier.RecognizeImage(Classifier.java:295) at com.amitshekhar.tflite.MainActivity$DetectThread.run(MainActivity.java:105)
I have already generated a tflite model corresponding to inputsize 416 and also changed the mOutWidth to this new int[]{13,26,52}. After this I am getting this error still java.lang.IllegalArgumentException: Cannot copy between a TensorFlowLite tensor with shape [1, 13, 13, 255] and a Java object with shape [1, 13, 13, 3, 85]
Can you please tell me what else I have to do to make this one work (for input size 416)?