GithubHelp home page GithubHelp logo

dj-core's Introduction

DeepJava

Read this in other languages: Русский

DeepJava (DJ) is a DeepLearning framework. One might ask: why do we need yet another DeepLearning framework? Good question. There is, at least, one thing that makes DJ different: it is, mainly, for the educational purpose. What does this mean exactly:

  • Codebase should be understandable (not fast). Anyone who has read a book about DeepLearning should be able to map main concepts from the book to the code in this framework (if concept already implemented);
  • You can experiment. Educational purpose means that the framework open for the experiments. Do you have an idea how to represent a computational graph in a non-canonical way? You can try it here!
  • Simple to use. DJ prioritizing the simplicity over the speed, such priority would not be possible with other frameworks.

Usage Example

1 Layer Perceptron With Sigmoid Activation Function

Network that we are building is describe in the chapter 2.

Context context = new Context(
         /* learningRate */ 0.2, 
         /* debug mode */ false);

InputNeuron inputFriend = new InputNeuron("friend");
InputNeuron inputVodka = new InputNeuron("vodka");
InputNeuron inputSunny = new InputNeuron("sunny");

ConnectedNeuron outputNeuron
        = new ConnectedNeuron.Builder()
            .bias(0.1)
            .activationFunction(new Sigmoid())
            .context(context)
            .build();

inputFriend.connect(outputNeuron, wFriend);
inputVodka.connect(outputNeuron, wVodka);
inputSunny.connect(outputNeuron, wSunny);

// Sending input signal to the graph:
inputFriend.forwardSignalReceived(null, 1.);
inputVodka.forwardSignalReceived(null, 1.);
inputSunny.forwardSignalReceived(null, 1.);

// Getting result and calculating the error:
double result = outputNeuron.getForwardResult();
double expectedResult = 1.;
double errorDy = 2 * (expectedResult - result);

// Sending error back to the graph:
outputNeuron.backwardSignalReceived(errorDy);

How To Contribute

There are several ways:

  • open bug/issue if you have found something or want us to do something;
  • submit a PR;

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.