Skip to main content

NumPy Neural Network

Project description

npnn

NumPy Neural Network

PyPI - Version PyPI - Implementation PyPI - Python Version

What's npnn?

npnn is a a torch-like Python module for gradient descent based machine learning implemented with numpy.

Dependency

Basically npnn only depends on numpy(the latest version 1.26.4 is verified).

If you have CUDA devices available, then you can easily get a acceleration by installing suitable version of cupy. In this case npnn will use cupy api rather than numpy api.

For example, my PC have CUDA v12.x (x86_64), so I use command:

pip install cupy-cuda12x
pip install npnn

or in short:

pip install npnn[cuda12x]

check cupy documentation for more information.

API references

See npnn WIKI.

Work with npnn!

Here we will construct a image classification neural network with npnn.

BTW, this is a course assignment of DATA620004, School of Data Science, Fudan University.

Task

Construct and Train a neural network on Fashion-MNIST to do image classification.

  • Implement gradient backpropagation algorithm by hand,you can use numpy but DO NOT use pytorch or tensorflow to do autograd.

  • Submit source code including at least four parts: model definition, training, parameters searching and testing.

Implementation

  • dataset.py: provide Fashion MNIST dataset
  • model.py: model definition
  • train.py: model training
  • search.py: parameters searching
  • test.py: model testing
  • utils.py: some misc function, such as save_mode

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

npnn-0.0.2.tar.gz (11.7 kB view details)

Uploaded Source

Built Distribution

npnn-0.0.2-py3-none-any.whl (12.1 kB view details)

Uploaded Python 3

File details

Details for the file npnn-0.0.2.tar.gz.

File metadata

  • Download URL: npnn-0.0.2.tar.gz
  • Upload date:
  • Size: 11.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.10.5

File hashes

Hashes for npnn-0.0.2.tar.gz
Algorithm Hash digest
SHA256 c199122d3d1be41e760dba169fcef3b1cac06669e80b97066679c9d0029197f0
MD5 daba7526fbe5449fe41787fbaea92064
BLAKE2b-256 1d4ad82cd754a4472901254930743fe764057d8eac3102c0df0e60124eab03a6

See more details on using hashes here.

File details

Details for the file npnn-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: npnn-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 12.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.10.5

File hashes

Hashes for npnn-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 0ef9e49f7221be5bd24f84cb48baa22598be623fb3d49a3ddfd121ba44d652bb
MD5 8cfb53a9f750450961fa4b4b928abfbe
BLAKE2b-256 0b95316ccde186e984ccedfd0fe87869fb6b4a356cbe42a42f312b06409a3d9c

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