Skip to main content

modelaverage

`modelaverage` is a pip package which make the average weight of model weight in `same models`, inspired by [Average weights in keras models](https://stackoverflow.com/questions/48212110/average-weights-in-keras-models). I created this pip package to use distributed computing environment like `kubernetes`.

Usage

  1. pip install modelaverage or git clone https://github.com/graykode/modelaverage && python setup.py install
  2. 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

Metadata

Release files for modelaverage 1.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for modelaverage 1.0.1
File Size Uploaded Provenance Actions
modelaverage-1.0.1.tar.gz 2.1 kB Without provenance Details for modelaverage-1.0.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for modelaverage 1.0.1
File Interpreter ABI Platform Actions
modelaverage-1.0.1-py3.6.egg Legacy Egg format - - Details for modelaverage-1.0.1-py3.6.egg

Total release size: 6.0 kB

Release files / modelaverage-1.0.1.tar.gz

Download URL modelaverage-1.0.1.tar.gz
Size 2.1 kB
Tags Source
SHA-256 checksum
How to use checksums
5b54e0cc921ca015ae8139a2e8a71e5c9a9e7125859e13bdb89a9377d349ba7c
BLAKE2b-256 checksum
How to use checksums
0707eb72d03b512eaa2a5179b004a833808ee9dde03d7ce616ff10901c81655f
Upload date
Uploaded using Trusted Publishing?
What is 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

Release files / modelaverage-1.0.1-py3.6.egg

Download URL modelaverage-1.0.1-py3.6.egg
Size 3.8 kB
Tags Egg
SHA-256 checksum
How to use checksums
15c08790e040473874e1aa4c4585ffbccd879841318b4b43dd1bcc02b1b92ca7
BLAKE2b-256 checksum
How to use checksums
f2f13f984c0bcd6a865038df6bbcc6358e089bd5b2a13433070316e78b118405
Upload date
Uploaded using Trusted Publishing?
What is 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

Security for modelaverage 1.0.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.0.1 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page