Skip to content

Quickstart

Install the SDK and run your first layer.

1. Install

pip install deepgate

Requires Python 3.10+ and PyTorch. The package is deepgate on PyPI; the import name is dg.

2. Check the version

import dg
print(dg.__version__)

3. Run your first layer

import torch
from dg.layer import Linear

layer = Linear(in_features=20, out_features=30, bias=True)
x = torch.randn(128, 20)
y = layer(x)

print(y.shape)  # torch.Size([128, 30])

Next steps