A basic neural networks python package
Project description
lpynn
This is a basic neural network package consisting of a single perceptron node. It can do binary classification.
Usage
Example:
from lpynn.perceptron import init_perceptron, print_perceptron, normalize_input_vectors, Perceptron, train_dataset
from lpython import i32, f64
def main0():
p: Perceptron = Perceptron(0, [0.0], 0.0, 0, 0.0, 0.0, 0)
init_perceptron(p, 2, 0.05, 10000, 90.0)
print_perceptron(p)
print("=================================")
input_vectors: list[list[f64]] = [[-1.0, -1.0], [-1.0, 1.0], [1.0, -1.0], [1.0, 1.0]]
outputs: list[i32] = [1, 1, 1, -1]
normalize_input_vectors(input_vectors)
train_dataset(p, input_vectors, outputs)
print_perceptron(p)
main0()
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
lpynn-0.0.2.2.tar.gz
(2.7 kB
view hashes)