Framework

core:

Define Core Classes

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

Abstract Neural Layer class

Parameters:
ci: int

Number of inputs

cn: int

Number of neurons

co: int

Number of outputs

property: dict

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

init()[source]

Init Layer random values

step(inp)[source]

Layer simulation step

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

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 receives the input network signal;
...            [0],  # - layer 1 receives the output signal
...                  # from the layer 0;
...            [1]]  # - the network exit receives the output
...                  # signal from the layer 1.
Example 2: for two-layers Elman network with derivatives:
>>> connect = [[-1, 0], # - layer 0 receives the input network
...                     # signal and output signal from layer 0;
...            [0],     # - layer 1 receives the output
...                     # signal from the layer 0;
...            [1]]     # - the network exit receives the output
...                     # signals from the layer 1.
copy()[source]

Copy network

init()[source]

Iinitialization layers

reset()[source]

Clear of deley

save(fname)[source]

Save network on file

Parameters:fname: file name
sim(input)[source]

Simulate a neural network

Parameters:
input: array like

array input vectors

Returns:
outputs: array like

array output vectors

step(inp)[source]

Simulated step

Parameters:
inp: array like

Input vector

Returns:
out: array

Output vector

train(*args, **kwargs)[source]

Train network see net.trainf.__doc__

class neurolab.core.Train(epochf, epochs)[source]

Base train abstract class

error(net, input, target, output=None)[source]

Only for train with teacher

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

Control of network training

Table Of Contents

Previous topic

Library

This Page