Skip to main content

Superduper allows users to work with arbitrary `torch` models, with custom pre-, post-processing and input/ output data-types, as well as offering training with superduper

Project description

superduper_torch

Superduper allows users to work with arbitrary torch models, with custom pre-, post-processing and input/ output data-types, as well as offering training with superduper

Installation

pip install superduper_torch

API

Class Description
superduper_torch.model.TorchModel Torch model. This class is a wrapper around a PyTorch model.
superduper_torch.training.TorchTrainer Configuration for the PyTorch trainer.

Examples

TorchModel

import torch
from superduper_torch.model import TorchModel

model = TorchModel(
    object=torch.nn.Linear(32, 1),
    identifier="test",
    preferred_devices=("cpu",),
    postprocess=lambda x: int(torch.sigmoid(x).item() > 0.5),
)
model.predict(torch.randn(32))

Training Example

Read more about this here

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

superduper_torch-0.0.5.tar.gz (18.7 kB view hashes)

Uploaded Source

Built Distribution

superduper_torch-0.0.5-py3-none-any.whl (18.2 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page