Giter Site home page Giter Site logo

kekloldyormarket / sisy Goto Github PK

View Code? Open in Web Editor NEW

This project forked from staccdotsol/sisy

0.0 0.0 0.0 674 KB

Genetic Algorithms for neural network optimization and topology search

License: Apache License 2.0

JavaScript 3.47% Python 46.83% CSS 26.15% HTML 5.91% SCSS 17.64%

sisy's Introduction

Sisyphus

Install sisy:

Sisy is still in development, to install it you would need to clone the repository and at the sisy/-root install it locally as a pip package wtih pip install -e . See https://pip.pypa.io/en/stable/reference/pip_install/#install-editable

Using Minos to do the heavy lifting, Sisy uses genetic algorithms to find the best topology and hyper parameters for your keras neural networks.

Examples

The examples directory tries to mimic the keras examples with added parameter searches.

This is based on reuters_mlp.py from keras examples.

          # Our Input size is the number of words in our reuters data we want to examine
layout = [('Input', {'units': 10000}),
          # 'units' : a range to try for the number of inputs 
          # 'activation' we specify a list of the activation types we want to try
          ('Dense', {'units': range(400, 600), 'activation': ['relu','tanh']}),
          # 'rate' is a f(loat)range from 0.2 to 0.8 , forced into a list
          ('Dropout', {'rate': list(frange(0.2,0.8))}),
          ('Output', {'units': 42, 'activation': 'softmax'})]

run_sisy_experiment(layout, 'sisy_reuters_mlp', (x_train, y_train), (x_test, y_test),
                    optimizer='adam',
                    metric='acc',
                    epochs=10,
                    batch_size=32,
                    n_jobs=8,
                    # 'devices' : Lets run this on the gpus 0 and 1
                    devices=['/gpu:0','/gpu:1'],
                    # 'population_size' : The number of different blueprints to try per generation.
                    population_size=10,
                    # 'generations' : The number of times to evolve the population
                    # ( evolving here means taking the best blueprints and
                    # combining them to create ${population_size} more new blueprints)
                    generations=10,
                    loss='categorical_crossentropy',
                    # 'shuffle' : Defaults to true
                    shuffle=False)

Which will produce log files that are viewable with the UI.

python -m sisy

Will open Sisy log viewer in your browser

Alt text

Alt text

The end result is an optimal network you can load with sisy_load_model("your_experiment_label")

sisy's People

Contributors

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