https://github.com/neuralyzer/kerasvis
Live visualization of the training of Keras models
https://github.com/neuralyzer/kerasvis
Last synced: 2 months ago
JSON representation
Live visualization of the training of Keras models
- Host: GitHub
- URL: https://github.com/neuralyzer/kerasvis
- Owner: neuralyzer
- License: gpl-3.0
- Created: 2016-04-06T15:16:24.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2017-02-08T13:23:33.000Z (over 8 years ago)
- Last Synced: 2025-03-21T08:48:28.556Z (3 months ago)
- Language: Python
- Size: 199 KB
- Stars: 22
- Watchers: 2
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Keras live visualization
========================This package visualizes ongoing Keras optimizations live in your browser.
Optimization runs are logged in a database. To use this visualization you have to
add `DBLogger` as callback to your optimization.Installation
------------Kerasvis is developed for Python 3 only.
It does not work with Python 2.
There are no plans to add Python 2 support.Install via pip the [kerasvis](https://pypi.python.org/pypi/kerasvis) package
pip install kerasvis
or install directly from github:
pip install git+git://github.com/neuralyzer/kerasvis.git
Quickstart example
------------------from kerasvis import DBLogger
from keras.models import Sequential
from keras.layers import Denseimport scipy as sp
X = sp.rand(200, 20)
y = (sp.rand(200, 1) < .5).astype(int)model = Sequential()
model.add(Dense(200, input_dim=20, activation="sigmoid"))
model.add(Dense(1, activation="sigmoid"))
model.compile("sgd", "binary_crossentropy")logger = DBLogger(comment="An example run")
history = model.fit(X, y, nb_epoch=100, batch_size=64, verbose=0,
validation_split=0.2, callbacks=[logger]Check the docstring of the DBLogger class for more information.
Start the keras visualization server with
export FLASK_APP=kerasvis.runserver
flask run
You'll see a web output similar to the one below
Delete runs from the database
-----------------------------Runs can be deleted with the `DBLogger`. To delete the run with id 3 you do
db_logger = DBLogger(id=3)
db_logger.delete()
you will then be asked if you really want to delete and have to confirm with "yes".Runs can also be delted via the web interface. To disable deletion via the webinterface
set the environment variableKERASVIS_ALLOW_DELETE=False