Giter VIP home page Giter VIP logo

java-neural-network-library's Introduction

Neural Network Library For Java

An neural network library without dependencies outside of Java's built-in packages. This was a project for learning both Java and neural networks. It was the largest project I've attempted at the time, so the code and design choices are not great. It uses JDK 1.8 and uses JavaFX that comes with JDK 1.8, but it is only used for data visualization in JavaFXTools.java so the dependency can be easily removed.

See the test cases for small examples of using the library.

Features

Layers

  • Dense/Fully-connected
  • Convolutional
  • Flatten
  • MaxPool

Optimizers

  • Momentum
  • Nesterov (Dozat's version as a workaround)
  • Adagrad
  • Adadelta
  • RMSProp
  • Adam
  • Adamax
  • Nadam
  • AMSGrad

Loss Functions

  • Quadratic
  • Huber
  • Pseudo Huber
  • Cross-entropy

Activation Functions

  • Linear
  • Sigmoid
  • Tanh
  • ReLU
  • Leaky ReLU
  • Swish
  • Mish
  • Softmax (Sometimes acts weird, not sure why)

Weight Initializers

  • Xavier
  • He

Other

  • Min Max Normalization
  • Z Score Normalization
  • Tanh Estimator Normalization

Customizable

  • All of the above categories can be extended to create new modules. An example can be found here: XOR_Classification.java

General Features

  • Built-in saving and loading of network parameters with both uncompiled and compiled .jar support
  • Displaying information about a neural network instance with JavaFX
    • A scrollable window with all parameters of each layer in the network
    • A graph that measures loss or accuracy of the network over each iteration of backpropagation

java-neural-network-library's People

Contributors

ssitu avatar

Stargazers

 avatar  avatar

Watchers

 avatar

java-neural-network-library's Issues

Please change hidden layers and such parameters to an enum

This library is seriously impressive, but like please don't use magic strings for parameters. For example:
String hiddenActivationFunction, String outputActivationFunction, String lossFunction, String optimizer from the constructor can be changed to enums of the same name. So in the end it would be in the constructor: HiddenActivationFunction name, OutputActivationFunction name, LossFunction name, Optimizer name (replace name obviously). The enum for Optimizer would be:

public enum LossFunction{ quadratic, log, crossEntropy }

Or something to that effect.

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.