tf-keras, make the average of model weight in same models
Project description
modelaverage
Usage
pip install modelaverageorgit clone https://github.com/graykode/modelaverage && python setup.py install- using function
average(modellist)- modellist : list of model file names.
- return : averaged weight model
Example
Please see example
import tensorflow as tf
from modelaverage import average
modellist = ['models/mnist1.h5', 'models/mnist2.h5', 'models/mnist3.h5', 'models/mnist4.h5', 'models/mnist5.h5',
'models/mnist6.h5', 'models/mnist7.h5', 'models/mnist8.h5', 'models/mnist9.h5']
averaged_model = average(modellist)
for w in averaged_model.get_weights():
print(w.shape)
Author
- Name : Tae Hwan Jung(@graykode)
- Email : nlkey2022@gmail.com
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
modelaverage-1.0.1.tar.gz
(2.1 kB
view details)
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
modelaverage-1.0.1-py3.6.egg
(3.8 kB
view details)
File details
Details for the file modelaverage-1.0.1.tar.gz.
File metadata
- Download URL: modelaverage-1.0.1.tar.gz
- Upload date:
- Size: 2.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.6.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5b54e0cc921ca015ae8139a2e8a71e5c9a9e7125859e13bdb89a9377d349ba7c
|
|
| MD5 |
bf74212c07b1a77b248f83395c67c6c9
|
|
| BLAKE2b-256 |
0707eb72d03b512eaa2a5179b004a833808ee9dde03d7ce616ff10901c81655f
|
File details
Details for the file modelaverage-1.0.1-py3.6.egg.
File metadata
- Download URL: modelaverage-1.0.1-py3.6.egg
- Upload date:
- Size: 3.8 kB
- Tags: Egg
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.6.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
15c08790e040473874e1aa4c4585ffbccd879841318b4b43dd1bcc02b1b92ca7
|
|
| MD5 |
2e3e7bee0a170342a756e34488cb592d
|
|
| BLAKE2b-256 |
f2f13f984c0bcd6a865038df6bbcc6358e089bd5b2a13433070316e78b118405
|