# Neural networks: train, deploy, predict

offrec started as a platform for training your own models. Its main product today is
[zero-retention inference for frontier models](/quickstart); training and deploying
your own networks is a side feature that still works end to end, from the console's
Neural networks extra or from code.

In the console, a board is a canvas where you design one model as a graph of layers,
starting from a preset (MLP, Simple CNN, Branching CNN, Tiny ViT, LeNet-5, AlexNet,
VGG16, ResNet block, Inception module). From code it looks like this:

```python
import offrec
px = offrec.Client()                                   # reads OFFREC_API_KEY

project = px.projects.create(name="Chest X-ray",
                             task_type="binary_image_classification")
model = px.models.create(
    project["id"], name="cnn-v1",
    architecture=offrec.architectures.image_classifier(num_classes=2),
)

# dataset = a .zip of class-named folders (image) or a .csv (tabular)
job = px.train(model.id, dataset="train.zip", epochs=5)
job.wait(on_progress=lambda j: print(j.status))       # blocks to terminal

dep = px.deployments.upload(project["id"], name="prod", checkpoint="model.pt")
deployment_id = dep["deployment"]["id"]
print(px.predict(deployment_id, "xray.jpg"))
# {"predictions": [...], "class_names": [...]}
```

CPU training and CPU inference on your deployments are free. GPU training on an
NVIDIA L4 bills $1.00 per hour, per second of actual compute, against your
[credits](/credits). You can also export a board as a PyTorch project ZIP, or deploy
a TorchScript `.pt` or an open-source catalog model without training.

A deployment can be marked data-compliant: the input is deleted as soon as the
prediction is computed, errors stay out of the stats log, and each response carries
a compliance receipt. See [compliance](/compliance).

Next: [training](/training), [deployments](/deployments), [inference](/inference),
[architectures](/architectures).
