Giter Site home page Giter Site logo

imdeep2905 / neural-network-sandbox Goto Github PK

View Code? Open in Web Editor NEW
67.0 8.0 15.0 1.12 MB

This is a source code of Software called Neural Network Sandbox.Neural Network Sandbox makes making and training basic feed forward neural networks easy.

License: GNU General Public License v2.0

Python 100.00%
machine-learning deep-learning neural-networks python gui kivy tensorflow keras matplotlib

neural-network-sandbox's Introduction

Neural-Network-Sandbox

Current Version: V1.0

logo

Demo of Neural Network Sandbox
Demo

Contents

  1. Introduction
  2. Installation
  3. How to run
  4. Features
  5. Known Issues
  6. Acknowledgment
  7. Credits

Introduction

Neural Network Sandbox is a GUI based application which makes making and training basic feed forward neural networks easy.

Before starting: Assume default value of parameters which are not listed here.(For Ex: batch_size=32)

Installation

Currently we are working on one executable file and pip package for this application.

Updates about package and executable will be posted here

How to run

While there is no executable available you can try Neural Network Sandbox with source code.

Before running Make Sure you have graphviz installed on your PC. Also make sure you have graphviz in environment variables.See #1 For More info on this.

  1. Clone this repo. (Stable : V1.0.You can also clone current code but it maybe unstable)
  2. Fulfill requirements.txt (pip install -r requirements.txt).
  3. Run with command python main.py.

Features

Main Screen

Above is the screenshot of Application.We will see each section one by one

Readme

This button will simply redirect you to README.md (Which contains documentation)of Github repo.

Help

This button will simply redirect you to HELP.md(Which is useful for new users) of Github repo. You can read HELP.md if you are beginner in Neural networks.All the buzzwords are explained there.

Optimization Technique

This option gives user number of choices for optimizer for their network.Click on SGD to see options and select one of them.

Options are:

  • SGD
  • RMSprop
  • Adagrad
  • Adam
  • Adamax
  • Nadam
  • Adadelta

Loss Function

This option gives user number of choices for loss function for their network.Click on sparse_categorical_crossentropy to see options and select one of them.

Options are:

  • sparse_categorical_crossentropy
  • binary_crossentropy
  • categorical_crossentropy
  • mean_squared_error
  • mean_absolute_error
  • huber_loss
  • cosine_proximity
  • poisson

Add Layer

Clicking on this button will add new Layer in Layer Control.

Before Adding Layer: lc before

After Adding Layer: lc after

Remove Layer

Clicking on this button will add remove Layer from Layer Control.Note that minimum of 2 Layer is required so it can only remove layer when number of layers are >=3.

Before Removing Layer: lc before

After Removing Layer: lc after

Weights Intialization

This option gives user number of choices for weights intialization (kernal intialization) for their network.Click on he_normal to see options and select one of them.

Note that picked intializer will be used for the whole network.

Options are:

  • he_normal
  • he_uniform
  • lecun_normal
  • lecun_uniform
  • glorot_normal
  • glorot_uniform
  • RandomNormal
  • RandomUniform
  • Orthogonal

Learning rate

Input your choice of learning rate here.Generally it is between 0 and1.Here,default value is 0.01.

Epochs

Buttons + and - can be used for increasing or decreasing number of epochs.Note that minimum value is 1 however there is no limit on maximum value.

Start

start

Clicking this button will first check for errors (Error will be reported as popup if any) in selected options and than it will start training.

Reset

reset

Clicking this button will reset app to it's initial state(i.e. mainscreen shown in Features).

Batch Normalization

Checking this will add BatchNormalize layer after each layer in your network except ouput layer.

Use GPU

If you check this app will try it's best to utilize GPU for training.

Tensorflow Version Effects of this option
Tensorflow <2.1.0 (CPU) Checking or Unchecking will not make any difference
Tensorflow-gpu <=2.0.0 Checking will use GPU (won't work if CUDA is not configured) unchecking will use CPU.
Tensorflow == 2.1.0 (Which supports both CPU and GPU) Checking will use GPU (will work on CPU if CUDA is not configured) unchecking will use CPU.

Shuffle Data

Checking this will shuffle training data before training.

Training Stats

After training if finished all stats (like accuracy,loss etc..) will be shown here.

Note that it only shows following metrics:

  • Loss
  • accuracy
  • mse
  • val_loss (if validation split >0)
  • val_accuracy (if validation split >0)
  • val_mse (if validation split >0)

Layer Control

lc before

You can give number of neurons and activation for each layer in layer control.Minimum number of neurons is 1 however there is no limit on maximum value.

Click on sigmoid to select other options for activation.

Options are:

  • sigmoid
  • relu
  • elu
  • selu
  • tanh
  • softmax
  • linear

Note that You can't select activation for first layer.

Network Drawing

Network Drawing will be shown in middle of application.Default Drawing is Input -> Ouput as shown in main screen.Drawing will be updated after training (given training is successful).

Note that it is not practical to include all neurons in drawing so for performance reasons number of neurons in drawing are limited to 13.

Save Current Model

After Training you can save your model by clicking this.It will give dynamic name to your file and save it with .h5 extension.Popup is shown upon successful saving.

Visualize Training

After training you can see graphical history of training by clicking this.It will open new window containing image.

vis_train

Browse Training Data

You can select any training file with .csv extension.Before selecting note that app only supports single label in training data.

Load Exsisting Model

You can load any file (Even model which is trained outside this application) with .h5 extension.Layer control and Network Drawing will be set according to loaded model.

Note that as app only supports simple feed forward networks, loading file of other networks may not give appropiate output.

Testing Stats

After training and testing (if testing data is selected) you can click this button to view testing statistics.Popup will be shown with this statistics.

This Contains:

  • loss
  • accuracy
  • mse

Browse Testing Data

You can select any testing file with .csv extension.Before selecting note that app only supports single label in testing data.

Report a Bug

Clicking this button will simply redirect you to issues page of github repo.You can raise new issue and we'll try our best to fix it.

Label at Start

Checking it tells app that label is in first column of training/testing file. UnChecking it tells app that label is in last column of training/testing file.

Smart Preprocess Data

This is an experimental feature.

Checking this will preprocess selected training/testing before starting.It does mainly following:

  • Remove Unnecessary columns(Based on number of unique values).
  • Fill Missing data with median.
  • Replace text data with number representation.

Validation Split

Slide it to select percentage of validation data from training data.0% means no validation.

Known Issues

Issue Fixed
Sometimes Visualize training doesn't work No

Acknowledgment

We would like to thank Dr. Devang Pandya, Adani Institute of Infrastructure Engineering for his continuous guidance and support.

Credits

Contributors ๐Ÿ’ป :

neural-network-sandbox's People

Contributors

imdeep2905 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

neural-network-sandbox's Issues

<class 'FileNotFoundError'> Error.

  1. New venv, activated and installed requirements.
  2. Ran python main.py in cmd prompt.
  3. Window generated with error. See image here.
  4. Below is the traceback.

What seems to be the problem here?

<class 'FileNotFoundError'>
(2, 'The system cannot find the file specified', None, 2, None)
You can report this using report bug button
File "main.py", line 7, in
NNSandboxApp().run()
File "C:\Users\SLATE17.conda\envs\tensorflow\lib\site-packages\kivy\app.py", line 855, in run
runTouchApp()
File "C:\Users\SLATE17.conda\envs\tensorflow\lib\site-packages\kivy\base.py", line 504, in runTouchApp
EventLoop.window.mainloop()
File "C:\Users\SLATE17.conda\envs\tensorflow\lib\site-packages\kivy\core\window\window_sdl2.py", line 747, in mainloop
self._mainloop()
File "C:\Users\SLATE17.conda\envs\tensorflow\lib\site-packages\kivy\core\window\window_sdl2.py", line 479, in _mainloop
EventLoop.idle()
File "C:\Users\SLATE17.conda\envs\tensorflow\lib\site-packages\kivy\base.py", line 339, in idle
Clock.tick()
File "C:\Users\SLATE17.conda\envs\tensorflow\lib\site-packages\kivy\clock.py", line 591, in tick
self._process_events()
File "kivy_clock.pyx", line 384, in kivy._clock.CyClockBase._process_events
File "kivy_clock.pyx", line 414, in kivy._clock.CyClockBase._process_events
File "kivy_clock.pyx", line 412, in kivy._clock.CyClockBase._process_events
File "kivy_clock.pyx", line 167, in kivy._clock.ClockEvent.tick
File "C:\Users\SLATE17\Downloads\Neural-Network-Sandbox-master\Frontend\MainApp.py", line 51, in default_drawing
self.drawer.draw(layers=[1,1],weighted=False)
File "C:\Users\SLATE17\Downloads\Neural-Network-Sandbox-master\Frontend\Drawing.py", line 61, in draw
check_call(['dot','-Tpng','network_graph.txt','-o','Network_Drawing.png']) #Converts .txt -> .png
File "C:\Users\SLATE17.conda\envs\tensorflow\lib\subprocess.py", line 358, in check_call
retcode = call(*popenargs, **kwargs)
File "C:\Users\SLATE17.conda\envs\tensorflow\lib\subprocess.py", line 339, in call
with Popen(*popenargs, **kwargs) as p:
File "C:\Users\SLATE17.conda\envs\tensorflow\lib\subprocess.py", line 800, in init
restore_signals, start_new_session)
File "C:\Users\SLATE17.conda\envs\tensorflow\lib\subprocess.py", line 1207, in _execute_child
startupinfo)

File not found error

Hi, please see below.

<class 'FileNotFoundError'>
(2, 'The system cannot find the file specified', None, 2, None)
You can report this using report bug button
None
2020-04-26 11:49:15.345047: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library cudart64_101.dll
[INFO ] [Logger ] Record log in C:\Users\Wendi.kivy\logs\kivy_20-04-26_50.txt
[INFO ] [deps ] Successfully imported "kivy_deps.gstreamer" 0.1.18
[INFO ] [deps ] Successfully imported "kivy_deps.angle" 0.1.10
[INFO ] [deps ] Successfully imported "kivy_deps.glew" 0.1.12
[INFO ] [deps ] Successfully imported "kivy_deps.sdl2" 0.1.23
[INFO ] [Kivy ] v1.11.1
[INFO ] [Kivy ] Installed at "C:\Users\Wendi\anaconda3\lib\site-packages\kivy_init_.py"
[INFO ] [Python ] v3.7.6 (default, Jan 8 2020, 20:23:39) [MSC v.1916 64 bit (AMD64)]
[INFO ] [Python ] Interpreter at "C:\Users\Wendi\anaconda3\python.exe"
[INFO ] [Image ] Providers: img_tex, img_dds, img_sdl2, img_pil, img_gif (img_ffpyplayer ignored)
[INFO ] [Text ] Provider: sdl2
[INFO ] [Factory ] 184 symbols loaded
[INFO ] [Window ] Provider: sdl2
[INFO ] [GL ] Using the "OpenGL" graphics system
[INFO ] [GL ] GLEW initialization succeeded
[INFO ] [GL ] Backend used
[INFO ] [GL ] OpenGL version <b'4.6.0 NVIDIA 445.87'>
[INFO ] [GL ] OpenGL vendor <b'NVIDIA Corporation'>
[INFO ] [GL ] OpenGL renderer <b'GeForce RTX 2080 Ti/PCIe/SSE2'>
[INFO ] [GL ] OpenGL parsed version: 4, 6
[INFO ] [GL ] Shading version <b'4.60 NVIDIA'>
[INFO ] [GL ] Texture max size <32768>
[INFO ] [GL ] Texture max units <32>
[INFO ] [Window ] auto add sdl2 input provider
[INFO ] [Window ] virtual keyboard not allowed, single mode, not docked
[INFO ] [GL ] NPOT texture support is available
[INFO ] [Base ] Start application main loop
[INFO ] [Base ] Leaving application in progress...
File "C:\Users\Wendi\Neural-Network-Sandbox\main.py", line 7, in
NNSandboxApp().run()
File "C:\Users\Wendi\anaconda3\lib\site-packages\kivy\app.py", line 855, in run
runTouchApp()
File "C:\Users\Wendi\anaconda3\lib\site-packages\kivy\base.py", line 504, in runTouchApp
EventLoop.window.mainloop()
File "C:\Users\Wendi\anaconda3\lib\site-packages\kivy\core\window\window_sdl2.py", line 747, in mainloop
self._mainloop()
File "C:\Users\Wendi\anaconda3\lib\site-packages\kivy\core\window\window_sdl2.py", line 479, in _mainloop
EventLoop.idle()
File "C:\Users\Wendi\anaconda3\lib\site-packages\kivy\base.py", line 339, in idle
Clock.tick()
File "C:\Users\Wendi\anaconda3\lib\site-packages\kivy\clock.py", line 591, in tick
self._process_events()
File "kivy_clock.pyx", line 384, in kivy._clock.CyClockBase._process_events
File "kivy_clock.pyx", line 414, in kivy._clock.CyClockBase._process_events
File "kivy_clock.pyx", line 412, in kivy._clock.CyClockBase._process_events
File "kivy_clock.pyx", line 167, in kivy._clock.ClockEvent.tick
File "C:\Users\Wendi\Neural-Network-Sandbox\Frontend\MainApp.py", line 51, in default_drawing
self.drawer.draw(layers=[1,1],weighted=False)
File "C:\Users\Wendi\Neural-Network-Sandbox\Frontend\Drawing.py", line 61, in draw
check_call(['dot','-Tpng','network_graph.txt','-o','Network_Drawing.png']) #Converts .txt -> .png
File "C:\Users\Wendi\anaconda3\lib\subprocess.py", line 358, in check_call
retcode = call(*popenargs, **kwargs)
File "C:\Users\Wendi\anaconda3\lib\subprocess.py", line 339, in call
with Popen(*popenargs, **kwargs) as p:
File "C:\Users\Wendi\anaconda3\lib\subprocess.py", line 800, in init
restore_signals, start_new_session)
File "C:\Users\Wendi\anaconda3\lib\subprocess.py", line 1207, in _execute_child
startupinfo)
[INFO ] [Base ] Start application main loop
[INFO ] [Base ] Leaving application in progress...

any ideas ?

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.