GithubHelp home page GithubHelp logo

segmind / keras-jukebox Goto Github PK

View Code? Open in Web Editor NEW
2.0 2.0 0.0 27 KB

UI to control learning rate, take snapshot and perform a few other actions without interrupting your training.

License: MIT License

Python 100.00%

keras-jukebox's Introduction

Acknowledgement

This project is supported by Segmind

keras JukeBox

This is a UI based hyper-parameter controller, which let's you control the following.

  • start, pause and stop a live training.
  • reset the learning rate on dynamically while training is in progress.
  • take a snapshot at will

more functionalities are to be added

Dependencies

This package depends on MQTT protocol for communication. So, it is expected that an MQTT broker is up and running in 'localhost' at port 1883(default port).

Install it by :


sudo apt-get update
sudo apt-get install mosquitto
sudo apt-get install mosquitto-clients

Python dependencies:

  • python >= 3.6.8
  • paho-mqtt
  • PyQt5
  • tensorflow >= 1.14

Note: This package is intended and tested for tensorflow-keras api and NOT keras with tensorflow 'backend'

Usage

you can try the following example

save the follwing example fashion_mnist_jukebox.py

from __future__ import absolute_import, division, print_function, unicode_literals

import tensorflow as tf
from tensorflow import keras


# import the callback
from keras_jukebox import JukeBoxCallback


fashion_mnist = keras.datasets.fashion_mnist

(train_images, train_labels), (test_images, test_labels) = fashion_mnist.load_data()


train_images = train_images / 255.0

test_images = test_images / 255.0

model = keras.Sequential([
    keras.layers.Flatten(input_shape=(28, 28)),
    keras.layers.Dense(128, activation='relu'),
    keras.layers.Dense(10, activation='softmax')
])


model.compile(optimizer='adam',
              loss='sparse_categorical_crossentropy',
              metrics=['accuracy'])

# pass the jukebox callback to model.fit method
model.fit(train_images, train_labels, epochs=10, callbacks=[JukeBoxCallback(verbose=1)])

and run it. You will notice that the script starts but training doesn't, which is because it is paused and needs a JukeBox-UI to start.

Now, open a new terminal(Alt+ctrl+T) and start the JukeBox by typing:


start_jukebox

and you should see the UI pop up, note the algorithm is in pause mode by default. Hit the play button to start the training.

keras-jukebox's People

Contributors

pk00095 avatar rohitrameshrao avatar

Stargazers

 avatar  avatar

Watchers

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