Git Product home page Git Product logo

neural-network-webapp's Introduction

DOODLE NUMBERZ

Video Demo:

https://youtu.be/jVBaQSjgU5c

Description:

  • website that lets you draw a number in a field
    • neural network (python) guessing the number after every stroke
    • show all possibilities for 0-9
  • ability to train the AI
    • by clicking correct answer (no matter if guess was right or wrong)
    • app.py can be changed to always start with the better of initial/trained model (### comments)
  • ability to compare initial model with trained one
    • show loss functions by clicking eval button
    • initial model depends on app.py > stupid, genius, trained

Design choices:

In the 'shipped' version i decided to always load the most stupid model (initialized with random parameters).

Like the heading 'AI TRAINER 3000' suggests, you are now able to train a model that has never seen numbers, to a model that recognizes them after a few trainings.

I am aware that one can always click the training buttons, no matter if they are wrong, or there isn't even a number drawn. But if a user decides to do this, he/she will just have a more stupid model and would be responsible for it.

(i tried out different settings to really get the feeling that bad training results in a bad network, even though 'good data' from mnist gets included in every train - depends on weight of user-inputs, sample size of mnist, number of training epochs)

The training always takes all weighted user samples since site refresh and n random samples from the mnist data set. Although i am aware that shuffling mnist data set on every train takes much time, this is the result of experimenting with different training sets and i think the current version gives a good sense of training with small sample sizes for the user.

I kept the styling (CSS) simple and am also aware that the site might not be scalable but my focus was on the following lessons:

  • sending data from frontend to backend and reverse
  • single site application (no reloading / subsites)
  • using, training, evaluating neural network
  • making the site robust (i.e. handling inputs, while training)

Parameters:

  • initial model
  • user input weight
  • mnist size on training
  • training epochs

Files:

app.py

  • flask app

model_init.ipynb

  • model built and config

/models

  • model saves

/static & /templates

  • JavaScript, CSS, icon, html

Toolset:

  • python
    • numpy
    • flask
    • tensorflow keras
    • jupyter notebook
  • JavaScript
    • asynchronous, fetch API
    • JSON
  • HTML
    • templating (JINJA)
  • CSS

neural-network-webapp's People

Contributors

xamweis avatar

Stargazers

 avatar  avatar  avatar  avatar  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.