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.
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
Release history Release notifications | RSS feed
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.2.zip
(12.4 kB
view details)
conx-1.0.2.tar.gz
(8.1 kB
view details)
Built Distributions
conx-1.0.2-py3-none-any.whl
(11.2 kB
view details)
conx-1.0.2-py2-none-any.whl
(11.2 kB
view details)
File details
Details for the file conx-1.0.2.zip
.
File metadata
- Download URL: conx-1.0.2.zip
- Upload date:
- Size: 12.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 611f0101bab939b2d5819d2e9cca673957d9daf4d0bd3490ab2124d69240c2e4 |
|
MD5 | ade18c21ead8a5089dad4316e18f148a |
|
BLAKE2b-256 | 95769c3c481f82bd5e4f194aa212c7295ca9a60496ed332f9dbc3aa3ace02079 |
File details
Details for the file conx-1.0.2.tar.gz
.
File metadata
- Download URL: conx-1.0.2.tar.gz
- Upload date:
- Size: 8.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5e952da6f6fac3d4b35fa26376795c5417926e16955100da90ebb03f90eae986 |
|
MD5 | cad22e5f9da0b3ead60bf82994c651ce |
|
BLAKE2b-256 | a5e420eeaabeafb0412ab7e2d2570244f8fa6c9510dc8cae42d3c3572a25d2ec |
File details
Details for the file conx-1.0.2-py3-none-any.whl
.
File metadata
- Download URL: conx-1.0.2-py3-none-any.whl
- Upload date:
- Size: 11.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 78c88ae69042442c7627ea6fa347055e95faa9d70d629031487a96688e0255a7 |
|
MD5 | 4b2150d08ca9d6b814f23fe3f6af2649 |
|
BLAKE2b-256 | b4735a81cedff973440fce15c172d6346f910289b0cac6bc87d33533598b60e3 |
File details
Details for the file conx-1.0.2-py2-none-any.whl
.
File metadata
- Download URL: conx-1.0.2-py2-none-any.whl
- Upload date:
- Size: 11.2 kB
- Tags: Python 2
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 21f0b8c03cd2619451ec6bc5b9367c2b166710c037e7544fa745cbeefe80c099 |
|
MD5 | 7e30066b73811268c1296bbbe1e3ef66 |
|
BLAKE2b-256 | d6e9240ccb3fa772730ec1275ad26dd37198c5d1d1ec4c722baadf94f1250e59 |