You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

superduper-torch

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

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

0.9.0
pipPyPI
Maintainers
1

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

  • Code
  • API-docs
ClassDescription
superduper_torch.model.TorchModelTorch model. This class is a wrapper around a PyTorch model.
superduper_torch.training.TorchTrainerConfiguration 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

Keywords

databases

FAQs

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts