Skip to main content

Python client for using npu api

Project description

NPU Python Client Package

To install, run:

pip install npu

To use in code:

import npu

This library has four core functions. npu.api, npu.compile, npu.train, npu.predict Here is an example script of them in use.

import npu
from npu.vision.models import resnet18
from npu.vision.datasets import CIFAR10


npu.api(API_KEY)

model = npu.train(resnet18(pretrained=True),
                         train_data=CIFAR10.train,
                         val_data=CIFAR10.val,
                         loss=npu.loss.CrossEntropyLoss,
                         optim=npu.optim.SGD(lr=0.01),
                         batch_size=128,
                         epochs=2)

output = npu.predict(model, data)

Full documentation is here

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for npu, version 0.2.21
Filename, size File type Python version Upload date Hashes
Filename, size npu-0.2.21-py3-none-any.whl (17.1 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size npu-0.2.21.tar.gz (11.5 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page