Coder Social home page Coder Social logo

deepdarkfantasy's Introduction

DeepDarkFantasy

Join the chat at https://gitter.im/ThoughtWorksInc/DeepDarkFantasy Build Status

What if we combine Functional Programming and Deep Learning?

As we all know, a neural network is just a computable math expression (and hence a program).

Can we add 'ordinary' programming construct to a 'neural network', like branch, loop, pair, sum, list, and function?

Of course, I must still be able to train the network.

Yes! I had add all the above construct, and I am planning to add more (stream, goto, exception, assignment, for example).

They all had their own special gradient structure to propagate loss accordingly.

However, in the end of the day, what is updated is only container of double (or other representation of real). Having those construct only make you right networks easier, but does not offer fundamentally different learning capability.


Can we make the language typed so we can detect error before we train the network?

Yes and No. I am able to type most stuff, but I am having trouble adding higher kinded type, so it is somewhat limited. I need a bit help here.


Can we make the language modular and extensible so all people can write all sorts of Chuck Norris move into the language?

Yes Yes Yes! The whole language is structured in a way very similar to finally tagless, and object algebra.

So, it is possible to add new operation/constructor, and still retain type safety.

In fact, there isn't even a core language! All feature(function, double, back propagation, pretty printing) is added as ordinary plugin so you can extend/subset the language as you can wish.

Patchouli Go!

Document is coming up. For now you can only read the code.

Example is here

Lang is the default language that is usable right off the shelf.

BEvalLang provide the capability to Evaluate a term and Back Propagate, ShowLang can pretty print stuff, and NextLang provide syntax sugar for Lambda Expression in the Network.

However, none of those files does anymore than assembling 'feature provider' from ShowList (which pretty print operation related to List), BEvalComb (which do evaluation and backpropagation on SKI/BCKW/Y Combinator), or whatNot.

Reading BEvalArrow -> BEvalDouble -> BEvalComb will get you know how stuff works. After that you can probably understand whatever just by tracing import dependency.

FA Q

How is the speed?

Horrible. This is more of a proof of concept that we can use function in neural network, than something that can get you good kaggle score right off the shelf.

Thank You Sir

This is heavily inspired by Neural Networks, Types, and Functional Programming, and my colleague, Atry

deepdarkfantasy's People

Contributors

atry avatar gitter-badger avatar marisakirisame avatar

Watchers

 avatar

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.