Я пытаюсь загрузить converted_tflite.tflite
из каталога ресурсов.
Это дает мне ошибку java.lang.IllegalArgumentException: Contents of /file:/android_asset/converted_model.tflite does not encode a valid TensorFlowLite model: Could not open '/file:/android_asset/converted_model.tflite'.The model is not a valid Flatbuffer file
File file = new File("file:///android_asset/converted_model.tflite");
try (Interpreter interpreter = new Interpreter(file)) {
interpreter.run(inputData, output);
Log.d("TF LOG", output);
}catch(Exception e){
e.printStackTrace();
}
То, что я пробовал на основе ответов stackoverflow
aaptOptions {
noCompress "tflite"
}
Nightsoflow-Lite ночная версия
implementation 'org.tensorflow:tensorflow-lite:0.1.2-nightly'