Installation
$ [sudo] pip install feedforwardnet-shine7
Usage
from Neural_Network import NeuralNetwork
# Create a Neural Network
inputs = 2
output_neurons = 1
hidden_layers = 2
each_hidden_nodes = [2, 3]
network = NeuralNetwork(inputs, hidden_layers, output_neurons, each_hidden_nodes)
Building a dataset
Dataset must be python list of data_samples, where each data_sample is a list of input and target.
For Eg: Input: [1, 1], Target: [1] => [[1, 1], [1]] is a data sample.
A typical XOR function's dataset looks something like :
>>> XOR_data =
[
[ ### ####
[0, 0], # Input Data
[0] # Output Sample
], ### ####
[
[0, 1],
[1]
],
[
[1, 0],
[1]
],
[
[1, 1],
[0]
]
]
>>> size = 4 # Length of the data
Training The network
The library provides a Train function which accepts the dataset, dataset size, and three optional parameters MAX_EPOCHS, graph, and log_outputs.
def Train(dataset, size, MAX_EPOCHS=10000, graph=False, log_outputs=True) :
....
....
For Eg: If you want to train your network for 5000 epochs and display epoch vs error graph after training.
>>> network.Train(XOR_data, size, MAX_EPOCHS=5000, graph=True)
Notice that I didn't change the value of log_outputs as I want the output to printed for each epoch.
Debugging
If you want to look at the network's weights at any point of time, the library provides a print_weights function.
>>> network.print_weights()
Metadata
Release files for feedforwardnet-shine7 0.0.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| feedforwardnet-shine7-0.0.4.tar.gz | 6.7 kB | Without provenance | Details for feedforwardnet-shine7-0.0.4.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| feedforwardnet_shine7-0.0.4-py3-none-any.whl | Python 3 | none | any | Details for feedforwardnet_shine7-0.0.4-py3-none-any.whl |
Total release size: 14.6 kB
Release files / feedforwardnet-shine7-0.0.4.tar.gz
| Download URL | feedforwardnet-shine7-0.0.4.tar.gz |
|---|---|
| Size | 6.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7cc6d3d887810aca4fed18d0a9debee2d184a873c91e88c0088e440ad398050b
|
|
BLAKE2b-256 checksum How to use checksums |
78c8181009a93b845d92c472648ac51119e43c8774c0abe2a6595af0bc1c5213
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.6.9
|
Release files / feedforwardnet_shine7-0.0.4-py3-none-any.whl
| Download URL | feedforwardnet_shine7-0.0.4-py3-none-any.whl |
|---|---|
| Size | 7.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
cf88248d5552c6bea092fe73079b2f3081e97e5cff7118da28df275ae94caed5
|
|
BLAKE2b-256 checksum How to use checksums |
72aed1d28bad822fc3d58704735ccc5f66e9c559b6c14b5613af9e8a4f40c03f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.6.9
|
Security for feedforwardnet-shine7 0.0.4
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.