GithubHelp home page GithubHelp logo

keras-visuals's Introduction

keras-visuals

Graphs to help you visualise the training of your Keras models.

Accuracy & loss graph

Graph after 50 epochs

Graph after 150 epochs

The graphs are dynamic and will automatically update and scale: after each epoch during the fit function.

The code

Import AccLossPlotter

from visual_callbacks import AccLossPlotter

Instantiate the plotter

plotter = AccLossPlotter(graphs=['acc', 'loss'], save_graph=True)
  • graphs is a list of the different graphs we would like to plot. Available ('acc', 'loss')
  • save_graph tells the Plotter to save a screenshot when training is finished.

Register callback with model

model.fit(X, Y, validation_split=0.2, nb_epoch=150, batch_size=10, callbacks=[plotter])

Confusion Matrix

After 50 epochs

After 100 epochs

It is clear from the confusion matrix that your model is confusing iris-versicolor for iris-virginica. Directed insight like this is a valuable tool for finding problem areas and improving your model.

The code

We import the ConfusionMatrixPlotter class from the visual_callbacks package.

from visual_callbacks import ConfusionMatrixPlotter

Instantiate the plotter

plotter = ConfusionMatrixPlotter(X_val=X_test, classes=class_names, Y_val=y_test)
  • X_val is a list of input values, this should typically be a seperate test set
  • Y_val is the list of output values for your X_val input set
  • classes is a list of class names

Register callback with model

model.fit(X_train, y_train, nb_epoch=100, batch_size=16, callbacks=[plotter])

What is next

  • Visualising Neural Network Layer Activation
  • t-SNE visualisation

Collaboration

Feel free to get in touch or send me a Pull Request

keras-visuals's People

Contributors

chasingbob avatar randomm 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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

keras-visuals's Issues

iris activation

For iris example, softmax activation function performs better than sigmoid.

Non responsive plot on Windows 7

Hi,

When I click on Figure 1 plot on Windows 7 it becomes non responsive. Though figure updates after every epoch, after a few switching back to my IDE and forth to it completely brokes it down and makes me force to stop training. I'd be glad to present any information that you need. PyCharm Comm Ed and Windows 7 with Python 3.5.

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.