Skip to main content

Neural network library on Keras

Project description

# conx

Neural Network Library for Cognitive Scientists

Built in Python on Keras

[![CircleCI](https://circleci.com/gh/Calysto/conx/tree/master.svg?style=svg)](https://circleci.com/gh/Calysto/conx/tree/master) [![codecov](https://codecov.io/gh/Calysto/conx/branch/master/graph/badge.svg)](https://codecov.io/gh/Calysto/conx)

Networks implement neural network algorithms. Networks can have as many hidden layers as you desire.

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

## Example

Computing XOR via a target function:

```python
from conx import Network, SGD

dataset = [[[0, 0], [0]],
[[0, 1], [1]],
[[1, 0], [1]],
[[1, 1], [0]]]

net = Network("XOR", 2, 2, 1, activation="sigmoid")
net.set_dataset(dataset)
net.compile(loss='mean_squared_error',
optimizer=SGD(lr=0.3, momentum=0.9))
net.train(2000, report_rate=10, accuracy=1)
net.test()
```

## Install

```shell
pip install conx -U
```

You will need to decide whether to use Theano or Tensorflow. Pick one:

```shell
pip install theano
```

or

```shell
pip install tensorflow
```

To use Theano as the Keras backend rather than TensorFlow, edit (or create) `~/.keras/kerson.json` to:

```json
{
"backend": "theano",
"image_data_format": "channels_last",
"epsilon": 1e-07,
"floatx": "float32"
}
```

## Examples

See the examples and notebooks folders for additional examples.


Project details


Download files

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

Source Distribution

conx-3.0.1.tar.gz (20.8 kB view details)

Uploaded Source

Built Distribution

conx-3.0.1-py2.py3-none-any.whl (23.4 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file conx-3.0.1.tar.gz.

File metadata

  • Download URL: conx-3.0.1.tar.gz
  • Upload date:
  • Size: 20.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for conx-3.0.1.tar.gz
Algorithm Hash digest
SHA256 55b2f4d5f9323c5753a88124ed6bba72c8cc8ebd55edc2413aea05a45b30099e
MD5 75a75edc8b98dad4702515025b283a4a
BLAKE2b-256 3646e7106b30479c55347cfbc7a61b029c6825cc38f5da1fa98cbf34746314b5

See more details on using hashes here.

File details

Details for the file conx-3.0.1-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for conx-3.0.1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 7038e17705912ec54d9aa439dcc05c32a58362c187e65b219d08ee58e73a2b38
MD5 499f5a9b5677a50985231ae05ee2ecd8
BLAKE2b-256 a18a8091dc5d31329bb8295e1ce45de2fdd504ff8f986e48ea24215b66faea67

See more details on using hashes here.

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