DeepLearning Linear Classifier
This sample is a Java app that runs on desktop, Android and iOS devices and performs neural network training, based on Deeplearning4j.
The sample is based on this one.
General prerequisites for all platforms are:
- Android SDK that can be downloaded from here (only the SDK is required, Android Studio is not really necessary).
- Using the Android SDK Manager, install Android Build tools 24.0.1 or superior, SDK platform 24 or superior, and the Android Support Repository.
- Create a gradle property with the name
ANDROID_HOME: defined in
~/.gradle/gradle.propertiesthat points to the Android SDK location.
- A Mac with MacOS X 10.11.5 or superior
- Xcode 9.2 or superior
Both iOS simulator from Xcode or a real iOS device can be used. For the latter, credentials from the Apple Developer program
will be required to sign the app, with a valid provisioning profile (
iosProvisioningProfile) and a valid signing identity (
For more details, see the related documentation.
This project will use Gluon VM, which is in Developer Preview. In case you run into issues, have a look at
the status page and the documentation and issues at the plugin page.
Clone the project
Clone or fork the project, and open it with your favorite IDE.
Build and run the project
Either from the IDE or from command line the project can be clean, build and run with the following gradle tasks, assuming that you are running Java 9:
Clean and build:
./gradlew clean build
Run on desktop:
Deploy to Android:
Deploy to iOS simulator:
Deploy to iOS device:
For more details about the different tasks or the
build.gradle file, see the Gluon Mobile