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

neuro-0.4.dev4.tar.gz (19.0 kB view details)

Uploaded Source

Built Distribution

neuro-0.4.dev4-py3-none-any.whl (25.2 kB view details)

Uploaded Python 3

File details

Details for the file neuro-0.4.dev4.tar.gz.

File metadata

  • Download URL: neuro-0.4.dev4.tar.gz
  • Upload date:
  • Size: 19.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.0 CPython/3.8.10

File hashes

Hashes for neuro-0.4.dev4.tar.gz
Algorithm Hash digest
SHA256 242a2dba14949156ec85d4829a72d0d6fec912e472a0d31cab6b8cf97353dadc
MD5 e29415bf7dd367953599fa296550cfaa
BLAKE2b-256 056417b3685d98e33e537b8db3b384b39b3d302ec6511fcf65b303cebd5b3c59

See more details on using hashes here.

File details

Details for the file neuro-0.4.dev4-py3-none-any.whl.

File metadata

  • Download URL: neuro-0.4.dev4-py3-none-any.whl
  • Upload date:
  • Size: 25.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.0 CPython/3.8.10

File hashes

Hashes for neuro-0.4.dev4-py3-none-any.whl
Algorithm Hash digest
SHA256 930f9e9a61fe3154adb15ea3da9fc8aeec164f322dc4cc13397905faf23bf23b
MD5 ba074f9e0c4ded25e8e9c8b39ae1c372
BLAKE2b-256 2d7b4ec67751f715ae82994977c1d89a04a7dc82f792bd775bbf0b45d6708e87

See more details on using hashes here.

Supported by

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