Deep Learning for Simple Folk. Built on Keras
Project description
Deep Learning for Simple Folk
Built in Python on Keras.
Read the documentation at conx.readthedocs.io
Implements Deep Learning neural network algorithms using a simple interface. Built on top of Keras, which can use either TensorFlow or Theano.
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:
from conx import Network, SGD
dataset = [[[0, 0], [0]],
[[0, 1], [1]],
[[1, 0], [1]],
[[1, 1], [0]]]
net = Network("XOR", 2, 5, 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
pip install conx -U
You will need to decide whether to use Theano or Tensorflow. Pick one:
pip install theano
or
pip install tensorflow
To use Theano as the Keras backend rather than TensorFlow, edit (or create) ~/.keras/kerson.json to:
{
"backend": "theano",
"image_data_format": "channels_last",
"epsilon": 1e-07,
"floatx": "float32"
}
Examples
See the examples and notebooks folders for additional examples.
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 Distribution
Built Distribution
File details
Details for the file conx-3.0.3.tar.gz
.
File metadata
- Download URL: conx-3.0.3.tar.gz
- Upload date:
- Size: 23.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | dfe65bfaec82e181b1e0db5251b5ce23d66922de5b8f20888afe12ff3f37a3c6 |
|
MD5 | 6a5dc8a76c44461b7bb11f04737fe918 |
|
BLAKE2b-256 | 1412a68afe5fe25c386b152b66f0151be3ca6bf0ea4cd840b5dc514edf60edd2 |
File details
Details for the file conx-3.0.3-py2.py3-none-any.whl
.
File metadata
- Download URL: conx-3.0.3-py2.py3-none-any.whl
- Upload date:
- Size: 26.2 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7f756a6de54bfee5c452bef5a4b377b142b4494297a03e13b25229e557df04c6 |
|
MD5 | 79af44d8d5f2af8b7e74639670951696 |
|
BLAKE2b-256 | 89174b2b845b2037d5f75b5379b073f2863aef4e1ad08eb5fe9a8957cc0e5e4a |