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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
npu-0.3.900.tar.gz
(19.3 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
npu-0.3.900-py3-none-any.whl
(26.9 kB
view details)
File details
Details for the file npu-0.3.900.tar.gz.
File metadata
- Download URL: npu-0.3.900.tar.gz
- Upload date:
- Size: 19.3 kB
- Tags: Source
- Uploaded using 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
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9bfc73f2e43014e6f07a8f624e969ff12474f5294a3566fa9ee1c8e047e282e8
|
|
| MD5 |
66f4f192c03b8c4b02cd0046e18934f1
|
|
| BLAKE2b-256 |
a32c2be7650f20209e2c75cb1e96a21931870310f6314b78b9459eff675cdd02
|
File details
Details for the file npu-0.3.900-py3-none-any.whl.
File metadata
- Download URL: npu-0.3.900-py3-none-any.whl
- Upload date:
- Size: 26.9 kB
- Tags: Python 3
- Uploaded using 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
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
27ecf58373e2d6cbffa2b9da18e0108a29e172b96176a247fc8aa7c64f03dcb5
|
|
| MD5 |
1831817b05ecd0341bc425568aae8b25
|
|
| BLAKE2b-256 |
01578a4b36dcd3102212464d4879a272f24c769fecea7c86f322ea4a5fcc45df
|