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
You must provide your own Keras or Tensorflow installation. See Pipfile for preferred versions.
If using the Keras bundled in Tensorflow:
from alt_model_checkpoint.tensorflow import AltModelCheckpoint
If using Keras standalone:
from alt_model_checkpoint.keras import AltModelCheckpoint
Common usage involving multi-GPU models built with Keras multi_gpu_model():
from alt_model_checkpoint.keras 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 test(runsmake test-buildautomatically to ensure deps)
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.13.0.tar.gz.
File metadata
- Download URL: alt-model-checkpoint-1.13.0.tar.gz
- Upload date:
- Size: 2.8 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 |
1e01f9c3c7b1661359b30549ba110c25ba16fa9d27e95c6371f4d90b3a418097
|
|
| MD5 |
f5e6572fc595869db0ea68e766c067d8
|
|
| BLAKE2b-256 |
22cd50af5d46294185a31c097b16a2f3e4e2e2d0b9b5a35ce421edbc44d189bf
|
File details
Details for the file alt_model_checkpoint-1.13.0-py3-none-any.whl.
File metadata
- Download URL: alt_model_checkpoint-1.13.0-py3-none-any.whl
- Upload date:
- Size: 5.9 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 |
076619e5986b92d950d1cff864137afa3fa74084822af94e23e520ac8ceeeed9
|
|
| MD5 |
3ff005ee79b79b95c2a689bea74537a9
|
|
| BLAKE2b-256 |
2bf139f9c171a5da62b4d55898f487638bb2de02b9ee7332ddd618a6c109675d
|