JsonMappingException

on linux:
download NDK
wget https://dl.google.com/android/repository/android-ndk-r21d-linux-x86_64.zip
export ANDROID_NDK=/YOUR_NDK_FOLDER/
export ANDROID_VERSION=28
git clone https://github.com/eclipse/deeplearning4j.git
cd deeplearning4j
mvn -B -V -U clean install -pl '!jumpy,!pydatavec,!pydl4j' -Dlibnd4j.platform=android-arm64   -Djavacpp.platform=android-arm64 -Dmaven.test.skip=true

@lavajaw
btw, manually adding libc++_shared.so worked for the android example. I was using 1.0.0-beta7. so I changed version to def dl4jVersion = '1.0.0-beta7'
could you try it again in your project the below way?
here how I did manual way for arm64:
create folder src/main/jnilibs/{platform}. for arm64 it will be src/main/jnilibs/arm64-v8a/
then form ndk folder find the appropriate libc++_shared.so (it should be inside sources/cxx-stl/llvm-libc++/libs/arm64-v8a/libc++_shared.so) and copy it to that folder
build and package your apk again

P.S: I know you already tried it. but other than building manually its the fast alternative for now. So it is worth to retry

@quickwritereader yes, I tried with with solution you provided in last comment. And model is working,
but output of that model is array of NaNs. I can send you example of model. Same code - same model is working on windows and linux. But on android device when I add libc++_shared.so it returns array of NaN.

I see. It could be also something related to blas function or precision. Have you tried it with double?

@quickwritereader no I can try it too. But it will slow-down model? I need to run it fast because it processing frames from camera in real time.

Just to have all information’s:
I have models trained on beta5, beta6 and beta7. Models on beta5 and beta6 works on android fine (model trained on beta6 run on application with lib version beta6, etc…)

I believe if it happens in the latest version ,too. we have to step-by step print it to see in which step it becomes nan

you should somehow try the Openblas version from beta6 or the latest one to see if it works. check android-examples build gradle also

@quickwritereader I just executed model trained with DataType.DOUBLE and it has values, not NaNs.
So beta7 have problem with FLOAT on android.

Also when i tried to make one train one model with HALF I got this:
Caused by: org.nd4j.linalg.exception.ND4JIllegalStateException: Op [histogram] X argument uses leaked workspace pointer from workspace [WS_LAYER_WORKING_MEM]: Workspace the array was defined in is no longer open.

And when i tried to train with BFLOAT16:
IllegalStateException:Data type must be a floating point type: one of DOUBLE, FLOAT, or HALF. Got datatype: BFLOAT16

@quickwritereader Its bad solution to have only DOUBLE data type for android devices, I guess that is better to have INT or HALF, FLOAT… it can speed execution?

yes, double was just for tests.
there is a possibility that it is related to a third-party library, probably to the blas as you stated it was working on pc.

for speed and memory float type better than double. as for half its not widely supported for now. some used quantization successfully, too
we are thinking of improving at least the inference side of our library using arm based libraries.

@quickwritereader first thank you for your help all day :slight_smile:

So what I should expect in next period? My company has live product and we depend on dl4j.
Do you expect new version of library soon with fixed this issue for android?
Should I write topic somewhere so you can be aware of this problem?

@agibsonccc wrote me in section Feature Request that you are working on arm support and that are great news! I cant wait that support :slight_smile: With that, dl4j will open whole world.

@lavajaw yeah we have an active PR being worked by @quickwritereader that’s why I had him taking over this discussion :slight_smile: we’ll get there.

@agibsonccc @quickwritereader thanks, please notify me when something is ready. This is blocker for my application.

if it is fine, could you provide us with minimal reproducible code or program and its model?
thanks.

I have a Gmail.com account with my username

@quickwritereader i will send you in DM