Giter Site home page Giter Site logo

deeplearning4j's Introduction

Deeplearning4J

A java deep learning repository with DL4J based projects made from scratch. Projects included so far:

  1. Customer loss prediction using standard feed forward network
  2. Animal classification using CNN
  3. HyperParameter tuning using Java
  4. Santander Value Prediction Kaggle Challenge

Make sure to switch over pom.xml changes as per your convenience whether you are using a GPU or not.

pom.xml changes

1. Customer loss prediction using standard feed forward network

Given defined n labels, obtain the probability of a customer who leaves the bank. The problem statement is taken from a course driven by a superdatasciene team. They discuss a solution using Keras implementation while this is an attempt to do the same with Java. The DLJ4 model gives a consistent 85.5% accuracy which is better than the Keras model of 83% accuracy.

File link: https://github.com/rahul-raj/Deeplearning4J/blob/master/src/main/java/CustomerLossPrediction.java

Code execution:

DL4J - Customer Loss prediction example

Optimization

2. Animal classification using CNN (no pre-built model)

You may observe over-fitting if you're using GPU or running CPU with about 100 epochs. 30-60 epochs should be fine for a CPU execution, however feel free to fork this up, experiment on your own and send me a pull request if you obtain a good CNN model better than this existing one! DL4J github examples used alexnet while we just coded a custom model from scratch. 4 animal labels with 6000 images in total (training+testing). More images would result in an obvious increase of accuracy.

File link: https://github.com/rahul-raj/Deeplearning4J/blob/master/src/main/java/AnimalClassifier.java

Update: GPU fix has been done by DL4J team and updates available only on snapshots since changes are on ND4j backend. Yet to test them.

3. HyperParameter tuning using Java

Make sure to implement your own data provider

A bug has been reported to DL4J while I was coding this one, however they made a fix and it's available only on snapshots. Consider this as unstable version now until it's tested completely. Currently I'm checking with DL4J team to identify possible pitfall with the paramater space config or a possible bug that will soon to be reported to them.

File link: https://github.com/rahul-raj/Deeplearning4J/blob/master/src/main/java/HyperParamTuning.java

Update: Code fix has been done. Until a new version of DL4J is released, change your pom.xml to use snapshot version of DL4J or just copy the DataSetIteratorSplitter directly from the DL4J master. Note that I have already made a local copy of this class into the project repository.

Code execution:

DL4J - HyperParameter tuning

4. Santander Value Prediction Kaggle Challenge (Data pre-processing so far)

Probably the biggest learning curve where I plan to implement this Kaggle challenge all by using Java. Objective is to perform all the tasks (data pre-processing, transform, load, network config and evaluation) using Java. We're trying to build a production-ready real-time deep learning application.

File link: https://github.com/rahul-raj/Deeplearning4J/blob/master/src/main/java/SantanderValuePrediction.java

deeplearning4j's People

Contributors

rahul-raj avatar ovidr avatar

Stargazers

Timothy Spann avatar

Watchers

James Cloos avatar  avatar

Forkers

advancedsei

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.