Skip to content

Shaing/pymlp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 

Repository files navigation

pymlp (Multilayer perceptron)

A part of master's life.

Prerequistes

  • Python 3.x
  • Numpy
  • Matplotlib

Usage

python3 mlp.py -d 1
python3 mlp.py -d 1

Configrue Nodes of hidden layer

It's two hidden layers, you can modify below values of code chunk for setting nodes what you want to in the network.

pymlp/mlp.py

Lines 74 to 82 in ab73f85

''' initialize '''
nvectors = c.shape[0] # row size of input pattern
b_ninpdim = 2
b_ninpdim_1 = b_ninpdim + 1
i_nhid = 4
i_nhid_1 = i_nhid + 1
j_nhid = 2
j_nhid_1 = j_nhid + 1
k_noutdim = 1
for above sample means: 2-4-2-1

and here's hyperparameter

pymlp/mlp.py

Lines 106 to 113 in ab73f85

lower_limit = 0.001
iter_max = 5000
eta = 0.01
beta = 0.03
_iter = 0
iter_loop = 0
error_avg = 10

Result

  • Double moon
    image image

About

Multilayer perceptron(MLP) in Python.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages