Framework

core:

Define Core Classes

class neurolab.core.Layer(ci, cn, co, property)

Abstract Neural Layer class

Parameters :
ci: int

Number of inputs

cn: int

Number of neurons

co: int

Number of outputs

property: dict

propety: array shape example: {‘w: (10, 1), ‘b’: 10}

init()

Init Layer random values

step(inp)

Layer simulation step

class neurolab.core.Net(inp_minmax, co, layers, connect, trainf, errorf)

Neural Network class

Parameters :
inp_minmax: minmax: list ci x 2

Range of input value

co: int

Number of output

layers: list of Layer

Network layers

connect: list of list

Connection scheme of layers*

trainf: callable

Train function

errorf: callable

Error function with derivative

Connect format:
Example 1: for two-layers feed forwad network
>>> connect = [[-1], # - layer 0 reseives the input network signal;
...            [0],  # - layer 1 reseives the output signal
...                  # from the layer 0;
...            [1]]  # - the network exit reseives the output
...                  # signal from the layer 1.
Example 2: for two-layers Elman network with derivatives:
>>> connect = [[-1, 0], # - layer 0 reseives the input network
...                     # signal and output signal from layer 0;
...            [0],     # - layer 1 reseives the output
...                     # signal from the layer 0;
...            [1]]     # - the network exit reseives the output
...                     # signals from the layer 1.
copy()

Copy network

init()

Iinitialization layers

reset()

Clear of deley

save(fname)

Save network on file

Parameters :fname: file name
sim(input)

Simulate a neural network

Parameters :
input: array like

array input vectors

Returns :
outputs: array like

array output vectors

step(inp)

Simulated step

Parameters :
inp: array like

Input vector

Returns :
out: array

Output vector

train(*args, **kwargs)

Train network see net.trainf.__doc__

class neurolab.core.Train(epochf, epochs)

Base train abstract class

error(net, input, target, output=None)

Only for train with teacher

class neurolab.core.Trainer(Train, epochs=500, goal=0.01, show=100, **kwargs)

Control of network training

Table Of Contents

Previous topic

Library

This Page