simple-neural-works


Namesimple-neural-works JSON
Version 2.0.2 PyPI version JSON
download
home_pagehttps://github.com/TwentyOneError/simple_neural_works
SummaryThis is the simplest educational module for quick work with neural networks.
upload_time2025-10-07 19:45:37
maintainerNone
docs_urlNone
authorTwentyOneError
requires_python>=3.8
licenseNone
keywords neural networks simple backpropagation regularization leaky-relu
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Simple workS with neural networks #

## What is this? ##
The module allows working with simple neural networks (Currently, the simplest model of a multilayer perceptron neural network with the backpropagation method and the Leaky ReLu activation function is used).

## Quick Guide ##
The module is based on the following structure:

    
    from simple_neural_works import Neuro
    a = [5,30,30,20,9]
    ne = Neuro(a,0.1)
    ne.fill(False)
    in = [0.5,1,1,0,0.001] # some values to input
    a = ne.get_result(in,False)
    ou = [1,1,1,1,0,1,0,0,1] # some values to train
    ne.backpropagation(ou,False,L1=True)
    ne.save_m("filename.res",False)
    
    

Which Python provides by standard.


----------


### Using ###


Using the library is as simple and convenient as possible:

First, import main module using "from simple_neural_works import Neuro"

The second, you need to load or create an array with data using the load() or fill() function.

Examples of all operations:

Creating an instance of a neural network with which you will then work.

    ne = Neuro(array_width_of_slices_neaural_network,speed of backpropagation)


Filling the weights with initial random values is used to create a neural network from scratch:

    ne.fill(mute)


To load previously saved values from a file:

    ne.load("filenamehere.txt",mute)
    

Function used to obtain the result of a neural network calculation:

    ne.get_result([some float or int values to input in array],mute)


To train a neural network, use the following function. The input is an array, which should be the output of the neural network, the learning rate is controlled by the internal variable `ne.spd`, set manually and during network initialization. You can enable L1 or L2 regularization. Only used after the `get_result()` or `image_get_result()` function.

    ne.backpropagation([some int or float values to train in array],mute,L1,L2)


To quickly save an array of weights:

    ne.save("filenamehere.txt",mute)


Blank for recognizing monochrome numbers. To read data from a PNG image (the image is inverted in color, that is, you need to draw it black, although this is not so important). To avoid specifying the entire path to the file, start the file name with "./".

    ne.image_get_result("filename.png",mute)


----------


### Structure ###

Here are the main variables used in the library; for details, please refer directly to the library code, everything is described there in great detail.

An array storing weight values:
    
    ne.w

An array storing the output values of the activation function:

    ne.ou

Speed of backpropagation (between 0 and 1). If you don’t want to bother, then set it to 0.1. In more detail, at first you can use 1, towards the end of training 0.1:

    ne.speed

Error correction array. The last layer can be used for RNN neural networks.(It can be sent directly to the input of the backpropagation method).

    ne.correction_array

Average squared accuracy of the neural network response (after backpropagation).

    ne.accuracy

Please do not change the width array while working, this will cause the operation to malfunction.
----------

----------

## Developer ##

My GitHub: [link](https://github.com/TwentyOneError)

My Email: ourmail20210422@gmail.com

----------

I would be glad if someone knowledgeable about the topic gives advice or points out errors.

----------

Русский гайд будет позже, я так знатно подзаколебался писать гайд на английском на никому ненужный кусок говна написанный на коленке.

![img.png](https://aif-s3.aif.ru/images/018/907/27e9d88db6e449ff7b17a8f6c890f776.jpg)

### Я устал. Я сделал все что мог. ###

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/TwentyOneError/simple_neural_works",
    "name": "simple-neural-works",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": null,
    "keywords": "neural networks simple backpropagation regularization Leaky-ReLu",
    "author": "TwentyOneError",
    "author_email": "ourmail20210422@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/12/6e/058117a4666ec061e6e07b24b04134119ba82a09ef79c36a3feff5ff55e1/simple_neural_works-2.0.2.tar.gz",
    "platform": null,
    "description": "# Simple workS with neural networks #\r\n\r\n## What is this? ##\r\nThe module allows working with simple neural networks (Currently, the simplest model of a multilayer perceptron neural network with the backpropagation method and the Leaky ReLu activation function is used).\r\n\r\n## Quick Guide ##\r\nThe module is based on the following structure:\r\n\r\n    \r\n    from simple_neural_works import Neuro\r\n    a = [5,30,30,20,9]\r\n    ne = Neuro(a,0.1)\r\n    ne.fill(False)\r\n    in = [0.5,1,1,0,0.001] # some values to input\r\n    a = ne.get_result(in,False)\r\n    ou = [1,1,1,1,0,1,0,0,1] # some values to train\r\n    ne.backpropagation(ou,False,L1=True)\r\n    ne.save_m(\"filename.res\",False)\r\n    \r\n    \r\n\r\nWhich Python provides by standard.\r\n\r\n\r\n----------\r\n\r\n\r\n### Using ###\r\n\r\n\r\nUsing the library is as simple and convenient as possible:\r\n\r\nFirst, import main module using \"from simple_neural_works import Neuro\"\r\n\r\nThe second, you need to load or create an array with data using the load() or fill() function.\r\n\r\nExamples of all operations:\r\n\r\nCreating an instance of a neural network with which you will then work.\r\n\r\n    ne = Neuro(array_width_of_slices_neaural_network,speed of backpropagation)\r\n\r\n\r\nFilling the weights with initial random values is used to create a neural network from scratch:\r\n\r\n    ne.fill(mute)\r\n\r\n\r\nTo load previously saved values from a file:\r\n\r\n    ne.load(\"filenamehere.txt\",mute)\r\n    \r\n\r\nFunction used to obtain the result of a neural network calculation:\r\n\r\n    ne.get_result([some float or int values to input in array],mute)\r\n\r\n\r\nTo train a neural network, use the following function. The input is an array, which should be the output of the neural network, the learning rate is controlled by the internal variable `ne.spd`, set manually and during network initialization. You can enable L1 or L2 regularization. Only used after the `get_result()` or `image_get_result()` function.\r\n\r\n    ne.backpropagation([some int or float values to train in array],mute,L1,L2)\r\n\r\n\r\nTo quickly save an array of weights:\r\n\r\n    ne.save(\"filenamehere.txt\",mute)\r\n\r\n\r\nBlank for recognizing monochrome numbers. To read data from a PNG image (the image is inverted in color, that is, you need to draw it black, although this is not so important). To avoid specifying the entire path to the file, start the file name with \"./\".\r\n\r\n    ne.image_get_result(\"filename.png\",mute)\r\n\r\n\r\n----------\r\n\r\n\r\n### Structure ###\r\n\r\nHere are the main variables used in the library; for details, please refer directly to the library code, everything is described there in great detail.\r\n\r\nAn array storing weight values:\r\n    \r\n    ne.w\r\n\r\nAn array storing the output values of the activation function:\r\n\r\n    ne.ou\r\n\r\nSpeed of backpropagation (between 0 and 1). If you don\u0432\u0402\u2122t want to bother, then set it to 0.1. In more detail, at first you can use 1, towards the end of training 0.1:\r\n\r\n    ne.speed\r\n\r\nError correction array. The last layer can be used for RNN neural networks.(It can be sent directly to the input of the backpropagation method).\r\n\r\n    ne.correction_array\r\n\r\nAverage squared accuracy of the neural network response (after backpropagation).\r\n\r\n    ne.accuracy\r\n\r\nPlease do not change the width array while working, this will cause the operation to malfunction.\r\n----------\r\n\r\n----------\r\n\r\n## Developer ##\r\n\r\nMy GitHub: [link](https://github.com/TwentyOneError)\r\n\r\nMy Email: ourmail20210422@gmail.com\r\n\r\n----------\r\n\r\nI would be glad if someone knowledgeable about the topic gives advice or points out errors.\r\n\r\n----------\r\n\r\n\u0420\u00a0\u0421\u0453\u0421\u0403\u0421\u0403\u0420\u0454\u0420\u0451\u0420\u2116 \u0420\u0456\u0420\u00b0\u0420\u2116\u0420\u0491 \u0420\u00b1\u0421\u0453\u0420\u0491\u0420\u00b5\u0421\u201a \u0420\u0457\u0420\u0455\u0420\u00b7\u0420\u00b6\u0420\u00b5, \u0421\u040f \u0421\u201a\u0420\u00b0\u0420\u0454 \u0420\u00b7\u0420\u0405\u0420\u00b0\u0421\u201a\u0420\u0405\u0420\u0455 \u0420\u0457\u0420\u0455\u0420\u0491\u0420\u00b7\u0420\u00b0\u0420\u0454\u0420\u0455\u0420\u00bb\u0420\u00b5\u0420\u00b1\u0420\u00b0\u0420\u00bb\u0421\u0403\u0421\u040f \u0420\u0457\u0420\u0451\u0421\u0403\u0420\u00b0\u0421\u201a\u0421\u040a \u0420\u0456\u0420\u00b0\u0420\u2116\u0420\u0491 \u0420\u0405\u0420\u00b0 \u0420\u00b0\u0420\u0405\u0420\u0456\u0420\u00bb\u0420\u0451\u0420\u2116\u0421\u0403\u0420\u0454\u0420\u0455\u0420\u0458 \u0420\u0405\u0420\u00b0 \u0420\u0405\u0420\u0451\u0420\u0454\u0420\u0455\u0420\u0458\u0421\u0453 \u0420\u0405\u0420\u00b5\u0420\u0405\u0421\u0453\u0420\u00b6\u0420\u0405\u0421\u2039\u0420\u2116 \u0420\u0454\u0421\u0453\u0421\u0403\u0420\u0455\u0420\u0454 \u0420\u0456\u0420\u0455\u0420\u0406\u0420\u0405\u0420\u00b0 \u0420\u0405\u0420\u00b0\u0420\u0457\u0420\u0451\u0421\u0403\u0420\u00b0\u0420\u0405\u0420\u0405\u0421\u2039\u0420\u2116 \u0420\u0405\u0420\u00b0 \u0420\u0454\u0420\u0455\u0420\u00bb\u0420\u00b5\u0420\u0405\u0420\u0454\u0420\u00b5.\r\n\r\n![img.png](https://aif-s3.aif.ru/images/018/907/27e9d88db6e449ff7b17a8f6c890f776.jpg)\r\n\r\n### \u0420\u0407 \u0421\u0453\u0421\u0403\u0421\u201a\u0420\u00b0\u0420\u00bb. \u0420\u0407 \u0421\u0403\u0420\u0491\u0420\u00b5\u0420\u00bb\u0420\u00b0\u0420\u00bb \u0420\u0406\u0421\u0403\u0420\u00b5 \u0421\u2021\u0421\u201a\u0420\u0455 \u0420\u0458\u0420\u0455\u0420\u0456. ###\r\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "This is the simplest educational module for quick work with neural networks.",
    "version": "2.0.2",
    "project_urls": {
        "GitHub": "https://github.com/TwentyOneError",
        "Homepage": "https://github.com/TwentyOneError/simple_neural_works"
    },
    "split_keywords": [
        "neural",
        "networks",
        "simple",
        "backpropagation",
        "regularization",
        "leaky-relu"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "d199040a05e2803f2b054bd6a7ba23b2aca1581f1fb151d3e7eae8f782891fa1",
                "md5": "d216d084b6bdcd65b4971831f1d92702",
                "sha256": "5f46ce80d415f661380d292e829e5ebee7a8868e455c280371342c03d1e5fa39"
            },
            "downloads": -1,
            "filename": "simple_neural_works-2.0.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "d216d084b6bdcd65b4971831f1d92702",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 7509,
            "upload_time": "2025-10-07T19:45:36",
            "upload_time_iso_8601": "2025-10-07T19:45:36.224658Z",
            "url": "https://files.pythonhosted.org/packages/d1/99/040a05e2803f2b054bd6a7ba23b2aca1581f1fb151d3e7eae8f782891fa1/simple_neural_works-2.0.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "126e058117a4666ec061e6e07b24b04134119ba82a09ef79c36a3feff5ff55e1",
                "md5": "6ad89cbb431744e4760c49d67e43e29f",
                "sha256": "c56e407f227757cb384b7e650cb0b85e6bad07d303510986e55b503c824df124"
            },
            "downloads": -1,
            "filename": "simple_neural_works-2.0.2.tar.gz",
            "has_sig": false,
            "md5_digest": "6ad89cbb431744e4760c49d67e43e29f",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 8522,
            "upload_time": "2025-10-07T19:45:37",
            "upload_time_iso_8601": "2025-10-07T19:45:37.332888Z",
            "url": "https://files.pythonhosted.org/packages/12/6e/058117a4666ec061e6e07b24b04134119ba82a09ef79c36a3feff5ff55e1/simple_neural_works-2.0.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-10-07 19:45:37",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "TwentyOneError",
    "github_project": "simple_neural_works",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "simple-neural-works"
}
        
Elapsed time: 1.57224s