Skip to content

An implementation of Policy Swarm Optimization of the problem of finding weights & biases for a neural net

Notifications You must be signed in to change notification settings

etale-cohomology/PSONet

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PSONet

This an implementation of Particle Swarm Optimization (PSO) to the (optimization) problem of discovering the weights & biases of a (fully connected) neural net.

The neural net is implemented from scratch in pure numpy. It also includes an implementation of backpropagation (the backward pass is unrolled by hand, so some work is required in order to add more layers).

The net is used to solve the XOR problem.

The PSO implementation was adapted from Machine Learning Mastery.

The net is implemented as using row-major linear algebra: net inputs are row vectors (or, for batched inputs, 2D matrices where each row is a feature vector, and one batch is a column vector or row vectors), weight matrices right-multiply input row vectors (or input matrices, for batched inputs).

dependencies

pip3 install numpy

About

An implementation of Policy Swarm Optimization of the problem of finding weights & biases for a neural net

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published