GithubHelp home page GithubHelp logo

aigenprotocol / aigenml Goto Github PK

View Code? Open in Web Editor NEW
5.0 3.0 0.0 62 KB

Aigen's artificial intelligence library to extract model weights and create shards based on the number of ainfts specified

License: MIT License

Python 100.00%

aigenml's Introduction

AigenML

Aigen's artificial intelligence library to extract model weights and create shards based on the number of ainfts specified

create environment variables

create a .env file and put these variables

PROJECTS_DIR=/Users/apple/aigen

commands

extract model weights and create shards in a single command

python main.py --action "create_shards" -n "test" -m "<path-to-model.h5>" -no 20

provide project name, model path and no of ainfts to create

  • For the time being, we only support Keras models

code

extract and save model weights

from aigenml import save_model
save_model(project_name=project_name, project_dir=os.environ.get("PROJECTS_DIR"), model_path=model_path)

provide model name and local model path to start extracting weights

create shards of model weights

from aigenml import create_shards
create_shards(project_name=project_name, project_dir=os.environ.get("PROJECTS_DIR"), no_of_ainfts=no_of_ainfts)

provide project name and no of ainfts to create. This function will automatically create shards of model weights

merge model shards

python main.py --action "merge_shards" --name test

this will merge shards back to recover the original weight files

load model (keras)

python main.py --action "load_model" --name test

this will load model from merged shards

License

This project is licensed under the MIT License - see the LICENSE file for details

aigenml's People

Contributors

kailashahirwar avatar

Stargazers

Dev Rishi Jain avatar  avatar Umesh Sharma avatar Satvik Aggarwal avatar  avatar

Watchers

 avatar Kostas Georgiou avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.