Skip to main content

Neural network library on Theano

Project description

# conx

Neural network library in Python built on Theano

Networks implement backpropagation of error algorithm. Networks can have as many hidden layers as you desire.

The network is specified to the constructor by providing sizes. For example, Network(2, 5, 1) specifies a 2-node input layer, 5-unit hidden layer, and a 1-unit output layer.

## Example

Computing XOR via a target function:

```
from conx import Network

inputs = [[0, 0],
[0, 1],
[1, 0],
[1, 1]]

def xor(inputs):
a = inputs[0]
b = inputs[1]
return [int((a or b) and not(a and b))]

net = Network(2, 2, 1)
net.set_inputs(inputs)
net.set_target_function(xor)
net.train()
net.test()
```

Given a specified XOR target:

```
from conx import Network
inputs = [[[0, 0], [0]],
[[0, 1], [1]],
[[1, 0], [1]],
[[1, 1], [0]]]
net = Network(2, 2, 1)
net.set_inputs(inputs)
net.train()
net.test()
```

## Install

```python
pip install conx -U
```

## Examples

See the examples folder for additional examples, including handwritten letter recognition of MNIST data.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

conx-1.0.3.zip (12.6 kB view hashes)

Uploaded Source

conx-1.0.3.tar.gz (8.0 kB view hashes)

Uploaded Source

Built Distribution

conx-1.0.3-py3-none-any.whl (11.3 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page