Keras callback for playing a sound when training is complete.
Project description
Keras callback for playing a sound when training is complete.
How do I install this package?
As usual, just download it using pip:
pip install keras_ding
The callback is based upon the python package playsound, which required a little additional setup for getting it started. Do check out its documentation to get started.
On macOS it boils down to installing pyobjc, as follows:
pip install pyobjc
Tests Coverage
Since some software handling coverages sometimes get slightly different results, here’s three of them:
Usage examples
So suppose you have your Keras model my_keras_model and you want to hear a sound when it is done training. Here you go:
from keras_ding import Ding
my_keras_model.fit(
x, y,
callbacks=[
Ding()
]
)
What abount a custom sound? Just pass it as an argument.
from keras_ding import Ding
my_keras_model.fit(
x, y,
callbacks=[
Ding(path="my_custom_sound.mp3")
]
)
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.