jetpacapp / DeepBeliefSDK

The SDK for Jetpac's iOS Deep Belief image recognition framework
Other
2.86k stars 437 forks source link

iOS - read only file system? #31

Open nathanaelneveux opened 9 years ago

nathanaelneveux commented 9 years ago

"Since you can't save files on iOS devices, the only way to create this file in the first place is to call jpcnn_print_predictor once you've created a predictor, and then copy and paste the results from the developer console into a file, and then add it to your app's resources."

Is this a hold over in the docs since I notice jpcnn_save_predictor in libjpcnn.h?

petewarden commented 9 years ago

The API's there, but I believe it will fail because the underlying file commands will error out on a read-only system unfortunately.

nathanaelneveux commented 9 years ago

And you're not able to save out to any of the app's savable directories - such as Documents or Library or tmp?

I guess as a work-a-round I could redirect stdout before the call to jpcnn_print_predictor and save it to disk myself in app.

joeldrotleff commented 9 years ago

@nathanaelneveux I can confirm that redirecting stdout to a file and using that as a saved network does indeed work.