A package to create, train and test neural networks with mutiple layers
Project description
NoxmainNetwork
NoxmainNetwork is a Python3 module to create, train and test neural networks with mutiple layers. To use this module you should know how a neural network works.
Content
Installation
To install the NoxmainNetwork package, just dowload it via pip. To do so execute this command in your Terminal/cmd:
pip3 install NoxmainNetwork
How to use
After installing the module via pip, you can import it to a python project. Now you can create a neural network by using the class NoxmainNetwork. This class has the parameters neurons, random=True, silent=False.
neurons: listContains the neurons of the neural network. Each item is a layer with [itemvalue] neurons. The neural network needs at least two layers and one neuron in each layer.random: boolIf true (default), the weights will be random when creating the neural network. Otherwise, every weight will be 0.0.silent: boolIf false (default), the NoxmainNetwork prints a message when loading or saving. Otherwise, it will not.
Example:
import NoxmainNetwork
nn = NoxmainNetwork.NoxmainNetwork([50, 30, 10])
You can train the neural network by using the function train. It has the parameters inputs, targets, learningrate.
inputs: listContains one training iteration data. The length of the list has to be the number of neurons in the first layer. The values have to be betweet 0 and 1.targets: listContains the correct ansewrs for the inputs. The length of the list has to be the number of neurons in the last layer. The values have to be betweet 0 and 1.learningrate: floatA smaller learningrate results a slower learning but more accurate results. a larger learningrate results faster learning but more inaccurate results. The value of the learningrate has to be between 0 and 1.
Example:
nn.train([0.05, 0.99, 0.95, 0.88, 0.98, 0.46, 0.59, 0.89, 0.54, 0.27, 0.93, 0.37, 0.43, 0.87, 0.59, 0.04, 0.63, 0.7, 0.86, 0.44, 0.9, 0.66, 0.56, 0.2, 0.75, 0.1, 0.07, 0.36, 0.78, 0.39, 0.9, 0.53, 0.66, 0.46, 0.18, 0.75, 0.43, 0.11, 0.1, 1.0, 0.52, 0.39, 0.84, 0.21, 0.9, 0.84, 0.13, 0.83, 0.31, 0.43],
[0.04, 0.52, 0.33, 0.13, 0.8, 0.19, 0.29, 0.27, 0.69, 0.26],
0.1)
After training the neural network, you can test it by using the funtion query. It has the parameter inputs and returns a list.
inputs: listContains one training iteration data. The length of the list has to be the number of neurons in the first layer. The values have to be betweet 0 and 1.returnThe coutput from the NoxmainNetwork.
Example:
outputs = nn.query([0.98, 0.58, 0.51, 0.48, 0.12, 0.36, 0.14, 0.61, 0.92, 0.69, 0.73, 0.82, 0.12, 0.88, 0.7, 1.0, 0.75, 0.19, 0.43, 0.45, 0.22, 0.55, 0.47, 0.29, 0.27, 0.06, 0.08, 0.36, 0.82, 0.83, 1.0, 0.03, 0.13, 0.89, 0.6, 0.1, 0.35, 0.32, 0.47, 0.12, 0.72, 0.54, 0.08, 0.06, 0.56, 0.07, 0.83, 0.82, 0.87, 0.76])
You can save a neural network by using the function save. If this file already exists, it will be overwritten. The function has the parameters name, hide=False.
name: strThe filename of the saved NoxmainNetwork. The file will be called [name].npy.hide: boolIf true, a dot is appended to the front to hide the file. Is false by default.
Example:
nn.save("nn")
You can load a saved neural network by using the function load. By loading a neural network the current weights will be overwritten by the loaded ones. The function has the parameters name, hidden=False.
name: strThe filename of the saved NoxmainNetwork. It tries to load the file called [name].npy.hidden: boolIf false (default), it tries to load a visible file. Otherwise, it tries to load a hidden file (beginning with a dot).
Example:
nn.load("nn")
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file NoxmainNetwork-1.7.2.tar.gz.
File metadata
- Download URL: NoxmainNetwork-1.7.2.tar.gz
- Upload date:
- Size: 4.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/51.3.3 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.9.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
12b2e7bf2a82e12070a91278dc22d1f308b624bbc9f7d102e05a5afa8f55cfe6
|
|
| MD5 |
02bef8591dca06fac2d88f791417edc6
|
|
| BLAKE2b-256 |
9a5bad58f40351829339e62d376b5085a3a19654a73b16420354d06b892e5929
|
File details
Details for the file NoxmainNetwork-1.7.2-py3-none-any.whl.
File metadata
- Download URL: NoxmainNetwork-1.7.2-py3-none-any.whl
- Upload date:
- Size: 5.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/51.3.3 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.9.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b127337b2e3a1fd8857966c428e95cdef0310d46e4522529ffb1c490ccb18e8d
|
|
| MD5 |
acd2ca295d27dd0f85af77f72e747799
|
|
| BLAKE2b-256 |
3c6592fe16cb14d98a92a465960b58921f90dd347f01dcb56c4a611d24ff2c25
|