An adapter callback for Keras ModelCheckpoint that allows checkpointing an alternate model (often submodel of a multi-GPU model).
Project description
alt-model-checkpoint
An adapter callback for Keras ModelCheckpoint that allows checkpointing an alternate model (often submodel of a multi-GPU model).
Installation
pip install alt-model-checkpoint
Usage
The import you need is:
from alt_model_checkpoint import AltModelCheckpoint
Common usage involving multi-GPU models built with Keras multi_gpu_model():
from alt_model_checkpoint import AltModelCheckpoint
from keras.models import Model
from keras.utils import multi_gpu_model
base_model = Model(...)
gpu_model = multi_gpu_model(base_model)
gpu_model.compile(...)
gpu_model.fit(..., callbacks=[
AltModelCheckpoint('save/path/for/model.hdf5', base_model)
])
Dev environment setup
- Install pipenv.
- Run
make.
Running tests
Run make test.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file alt-model-checkpoint-1.0.2.tar.gz.
File metadata
- Download URL: alt-model-checkpoint-1.0.2.tar.gz
- Upload date:
- Size: 2.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.4.2 requests/2.22.0 setuptools/39.1.0 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.6.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
24d7f699226f4b06ce1c28988ea12c9333f69a39fdc726eb300acff36dc26692
|
|
| MD5 |
456745fe37a3fda82b8c6e783bee6537
|
|
| BLAKE2b-256 |
565504433cd526f5f175169dc689395edac5e5f4783d9674927d4500e25c02c2
|
File details
Details for the file alt_model_checkpoint-1.0.2-py3-none-any.whl.
File metadata
- Download URL: alt_model_checkpoint-1.0.2-py3-none-any.whl
- Upload date:
- Size: 3.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.4.2 requests/2.22.0 setuptools/39.1.0 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.6.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9e770ded1c1008671dc39b83db8dab907767a32f59dd3b4b1d8930d50cb2fceb
|
|
| MD5 |
670688af43effdfd923b029699570264
|
|
| BLAKE2b-256 |
c733b69ebe9ef2ac714f615a3d05aba3cb0af4a91ee67986a2ff2d186d06f678
|