Skip to main content

Deep Learning Library based on pure Numpy

Project description Code Climate Issue Count

NumpyDL: Numpy Deep Learning Library


NumpyDL is:

  1. For My Homework
  2. For Education
  3. Based on Pure Numpy/Python


Its main features are:

  1. Pure in Numpy
  2. Native to Python
  3. Automatic differentiations are basically supported
  4. Commonly used models are supported: MLP, RNNs, GRUs, LSTMs and CNNs
  5. API like Keras library
  6. Examples for several AI tasks
  7. Application for a toy chatbot


Available online documents:

  1. latest docs
  2. development docs
  3. stable docs


Install NumpyDL using pip:

$> pip install npdl

Install from source code:

$> python install


import numpy as np
from sklearn.datasets import load_digits
import npdl

# prepare

# data
digits = load_digits()
X_train =
X_train /= np.max(X_train)
Y_train =
n_classes = np.unique(Y_train).size

# model
model = npdl.model.Model()
model.add(npdl.layers.Dense(n_out=500, n_in=64, activation=npdl.activation.ReLU()))
model.add(npdl.layers.Dense(n_out=n_classes, activation=npdl.activation.Softmax()))
model.compile(loss=npdl.objectives.SCCE(), optimizer=npdl.optimizers.SGD(lr=0.005))

# train,, max_iter=150, validation_split=0.1)


0.3.0 (2017-06-15)

Version 0.3.0.

  • Add chatbot application.
  • Add more examples.
  • Support LSTM.
  • Support GRU.

0.2.5 (2017-05-30)

Version 0.2.5.

Add almost all test.

0.2 (2017-05-10)

Second release.

Support Layers:

  • Batch Normalization Layer
  • Embedding Layer
  • MeanPooling Layer
  • Flatten Layer

Support Activations:

  • SymmetricElliot
  • LReLU
  • SoftPlus
  • SoftSign

Support Initializations:

  • HeNormal
  • HeUniform
  • Orthogonal

Add more tutorials.

Add more API comments.

0.1 (2017-04-11)

First release.

Support layers:

  • Dense (perceptron) Layer
  • Softmax Layer
  • Dropout Layer
  • Convolution Layer
  • MaxPooling Layer
  • SimpleRNN Layer

Support Activations:

  • Sigmoid
  • Tanh
  • ReLU
  • Softmax
  • Elliot

Support Initializations:

  • Uniform
  • Normal
  • LecunUniform
  • GlorotUniform
  • GlorotNormal

Support Objectives:

  • MeanSquaredError
  • HellingerDistance
  • BinaryCrossEntropy
  • SoftmaxCategoricalCrossEntropy

Support Optimizers:

  • SGD

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for npdl, version 0.3.0
Filename, size File type Python version Upload date Hashes
Filename, size npdl-0.3.0.tar.gz (112.0 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page