react-native-tensorflow
react-native-tensorflow copied to clipboard
Could not invoke RNImageRecognition.initImageRecognizer. Failed to allocate byte allocation.
Just cloned the repo, and ran the example as-is on a Genymotion android device with 4Gb RAM. Everything seems to build fine, but got this error in the device:
Could not invoke RNImageRecognition.initImageRecognizer.
null
Failed to allocate a 53884608 byte allocation with 25165824 free bytes and 31MB until OOM, max allowed footprint 93269104, growth limit 100663296.
I can imagine it is an "hardware" problem but I find it a bit strange it's not working on a 4096MB RAM device for an image classifier.
Maybe use TensorFlow Lite instead ? Any suggestion ?
Same issue here.
I also have a very large frozen graph (400mb), even after running the inference optimizer on it.
you can try this:add below entities in your manifest file
android:<application hardwareAccelerated="false"
android:largeHeap="true">
https://stackoverflow.com/questions/32244851/androidjava-lang-outofmemoryerror-failed-to-allocate-a-23970828-byte-allocatio
That did not work in my case. Thanks for the suggestion though.
On Mon, Jan 21, 2019, 12:19 AM alwaysmyz <[email protected] wrote:
you can try this:add below entities in your manifest file android:hardwareAccelerated="false" , android:largeHeap="true" just like below
I solve this error by this way.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/reneweb/react-native-tensorflow/issues/39#issuecomment-455984389, or mute the thread https://github.com/notifications/unsubscribe-auth/AWnaIQCBRhwcnfa7uLOVo9xQjZ-oBgXoks5vFXf-gaJpZM4Z9YOi .
