Skip to main content

A simple neural network library

Project description

sweet-perceptron

Python NumPy GitHub

This is a simple neural network library.

The model of NN is configurable multilayer Perceptron (MLP).

It was built only using NumPy.

Installation

Use the package manager pip to install sweet-perceptron.

pip install sweet-perceptron

Usage

from perceptron import NeuralNetwork
from perceptron.Neuron import functions

# Initialize network
nw = NeuralNetwork((2, 4, 1))

# Change activation functions
nw.activation_funcs = functions.relu, functions.tanh

# Initialize weights
nw.initialize_weights()

# Train netwotk and get list with losses
loss = nw.train(50, ['train inputs set'], ['train outputs set'])

# Get output of forward propagation
output = nw.forward(['input'])

License

MIT License

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

sweet-perceptron-1.0.1.tar.gz (6.6 kB view hashes)

Uploaded source

Built Distribution

sweet_perceptron-1.0.1-py3-none-any.whl (7.1 kB view hashes)

Uploaded py3

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