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.

Source Distribution

npu-0.2.21.tar.gz (11.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

npu-0.2.21-py3-none-any.whl (17.1 kB view details)

Uploaded Python 3

File details

Details for the file npu-0.2.21.tar.gz.

File metadata

  • Download URL: npu-0.2.21.tar.gz
  • Upload date:
  • Size: 11.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/47.1.1 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.7.9

File hashes

Hashes for npu-0.2.21.tar.gz
Algorithm Hash digest
SHA256 c6875033a2ac4c6945ab0093505a80880df9ef6b400044bc2cf4a4535234afed
MD5 83b71d710fcbe0f99881c0e4309ba2c8
BLAKE2b-256 d3f367243356671d1d42851bbb0d1391b3ed3e83e8f6eeef3888fc4aa6e98e3b

See more details on using hashes here.

File details

Details for the file npu-0.2.21-py3-none-any.whl.

File metadata

  • Download URL: npu-0.2.21-py3-none-any.whl
  • Upload date:
  • Size: 17.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/47.1.1 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.7.9

File hashes

Hashes for npu-0.2.21-py3-none-any.whl
Algorithm Hash digest
SHA256 586c2e68ff89f8ab0646d1454b5d3a4f468624393eef8c98d1b5a62d771af341
MD5 d9a7f6f7b1d96701ca08100ff4316aee
BLAKE2b-256 b4a4729df42248d9d8d28379103070a5b76f569c4cc51e7f337f7165802f7fa0

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page