Skip to content

spi-tch/moduler

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

module

This library allows you to create small subsections of a larger network (to be executed on a remote server)

Installation

You can install using either pip or conda

Install using pip

pip install moduler

Usage

Example with Pytorch

import moduler as md

import torch
import torch.nn as nn

import os
os.environ["BABS_API_KEY"] = "your_api_key"

model = nn.Sequential(
        nn.Linear(28 * 28, 128),        # module will run locally
        nn.ReLU(),                      # module will run locally
        md.Module(md.ModuleType.LINEAR, in_features=128, out_features=56),  # module will run on server
        nn.Linear(56, 10),              # module will run locally
    )

result = model(torch.randn(28 * 28))
print(result)

Example with Tensorflow

# coming soon...

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages