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
Release files for npu 0.3.900
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| npu-0.3.900.tar.gz | 19.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| npu-0.3.900-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 46.2 kB
Release files / npu-0.3.900.tar.gz
| Download URL | npu-0.3.900.tar.gz |
|---|---|
| Size | 19.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9bfc73f2e43014e6f07a8f624e969ff12474f5294a3566fa9ee1c8e047e282e8
|
|
BLAKE2b-256 checksum How to use checksums |
a32c2be7650f20209e2c75cb1e96a21931870310f6314b78b9459eff675cdd02
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.8.10
|
Release files / npu-0.3.900-py3-none-any.whl
| Download URL | npu-0.3.900-py3-none-any.whl |
|---|---|
| Size | 26.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
27ecf58373e2d6cbffa2b9da18e0108a29e172b96176a247fc8aa7c64f03dcb5
|
|
BLAKE2b-256 checksum How to use checksums |
01578a4b36dcd3102212464d4879a272f24c769fecea7c86f322ea4a5fcc45df
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.8.10
|