Unhandled Exception: PlatformException(Failed to run model, -268435449, java.lang.NegativeArraySizeException: -268435449
Opened this issue · 7 comments
Has anyone solved this yet every model I train I can't run it or deploy on the app cause of this error?
Make sure you already load the model
Make sure you already load the model
@Ucok23 i am now facing this error java.lang.IllegalArgumentException: Cannot copy from a TensorFlowLite tensor (StatefulPartitionedCall:0) with shape [1, 4] to a Java object with shape [1, 4, 4].
i dont know what could be wrong
// Configuration values for the prepackaged SSD model.
private static final int TF_OD_API_INPUT_SIZE = 224;
private static final boolean TF_OD_API_IS_QUANTIZED = false;
private static final String TF_OD_API_MODEL_FILE = "mobilenet.tflite";
private static final String TF_OD_API_LABELS_FILE = "labelmap.txt";
private static final DetectorMode MODE = DetectorMode.TF_OD_API;
// Minimum detection confidence to track a detection.
private static final float MINIMUM_CONFIDENCE_TF_OD_API = 0.5f;
private static final boolean MAINTAIN_ASPECT = false;
private static final Size DESIRED_PREVIEW_SIZE = new Size(640, 480);
private static final boolean SAVE_PREVIEW_BITMAP = false;
private static final float TEXT_SIZE_DIP = 10;
Wrong input to your model
Kindly help me out my model is to take 224*224
I have tried changing input size to 224 but nothing yields
can I know what you trying to make and what kind of data you use?
i am trying to deploy this model on android which does object detection and takes in 224*224 image size and outputs one bounding box
kindly help me out if you deployed any you could try out with this model
https://drive.google.com/file/d/1ZZ2QSlLrdYCqkW9MGEB0Ig_M4sF0Psjq/view?usp=sharing
or you can look at my detector code
https://codeshare.io/X8vYj8
Thanks in advance
so sorry i don't write jave