sh1r0 / caffe-android-demo

An android caffe demo app exploiting caffe pre-trained ImageNet model for image classification
https://github.com/sh1r0/caffe-android-lib
MIT License
255 stars 164 forks source link

how to release model data after work done? #54

Open Digital2Slave opened 7 years ago

Digital2Slave commented 7 years ago

Hi sh1r0! I modified the demo to meet the needs of my own app. The Caffe model I used is about 400+MB, but the sum memory of android phone is just 1GB. So, I want to know how to release the loaded model data in memory. Could you help me out ? Thanks any way! Best regards!

sh1r0 commented 7 years ago

The destruction method (https://github.com/sh1r0/caffe/blob/cmake_android/android/caffe_mobile.cpp#L82) should be exposed to jni layer. I'll fix it later, thanks.

Digital2Slave commented 7 years ago

@sh1r0 Thanks for your reply. I'm looking for your enhancement. Best regards!