{"id":18864321,"url":"https://github.com/devtronic/layerless","last_synced_at":"2026-02-11T07:30:20.216Z","repository":{"id":56967116,"uuid":"93930741","full_name":"devtronic/Layerless","owner":"devtronic","description":"Layerless ANN Foundation","archived":false,"fork":false,"pushed_at":"2017-06-10T16:57:06.000Z","size":9,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-12-30T21:29:12.556Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/devtronic.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-06-10T09:59:29.000Z","updated_at":"2017-07-05T12:44:02.000Z","dependencies_parsed_at":"2022-08-21T11:20:16.432Z","dependency_job_id":null,"html_url":"https://github.com/devtronic/Layerless","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devtronic%2FLayerless","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devtronic%2FLayerless/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devtronic%2FLayerless/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devtronic%2FLayerless/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/devtronic","download_url":"https://codeload.github.com/devtronic/Layerless/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239808525,"owners_count":19700451,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-08T04:40:52.587Z","updated_at":"2026-02-11T07:30:20.187Z","avatar_url":"https://github.com/devtronic.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![GitHub tag](https://img.shields.io/packagist/v/devtronic/layerless.svg)](https://github.com/Devtronic/layerless)\n[![Packagist](https://img.shields.io/packagist/l/Devtronic/layerless.svg)](https://github.com/Devtronic/layerless/blob/master/LICENSE)\n[![Travis](https://img.shields.io/travis/Devtronic/Layerless.svg)](https://travis-ci.org/Devtronic/layerless/)\n[![Packagist](https://img.shields.io/packagist/dt/Devtronic/layerless.svg)](https://github.com/Devtronic/layerless)\n\n# Layerless\n\nLayerless is the new foundation of the [legendary mind](https://github.com/Devtronic/legendary-mind) neural network project\n\n## Installation\n```bash\ncomposer require devtronic/layerless\n```\n\n## Usage\n```php\n\u003c?php\n\n// Import the SinusActivator as Activator\nuse Devtronic\\Layerless\\Activator\\SinusActivator as Activator;\nuse Devtronic\\Layerless\\BiasNeuron;\nuse Devtronic\\Layerless\\InputNeuron;\nuse Devtronic\\Layerless\\Neuron;\nuse Devtronic\\Layerless\\Synapse;\n\n// Load Composer autoload\nrequire_once __DIR__ . '/vendor/autoload.php';\n\n// Create the activator\n$activator = new Activator();\n\n// Create 2 Input Neurons and 1 Bias Neuron\n$inputA = new InputNeuron(1);\n$inputB = new InputNeuron(0);\n$bias = new BiasNeuron(1);\n\n// Create 1 Output Neuron\n$output = new Neuron($activator);\n\n// Connect the neurons\n\nnew Synapse(0.90, $inputA, $output);\nnew Synapse(0.23, $inputB, $output);\nnew Synapse(0.50, $bias, $output);\n\n// Activate the neurons\n$inputA-\u003eactivate();\n$inputB-\u003eactivate();\n$output-\u003eactivate();\n\necho $output-\u003egetOutput() . PHP_EOL; // 0.98545\n\n// Back propagate\n$target = 0;\n$output-\u003ecalculateDelta($target);\n$inputA-\u003ecalculateDelta();\n$inputB-\u003ecalculateDelta();\n\n$learningRate = 0.2;\n$output-\u003eupdateWeights($learningRate);\n$inputA-\u003eupdateWeights($learningRate);\n$inputB-\u003eupdateWeights($learningRate);\n\n// Re-Check\n$inputA-\u003eactivate();\n$inputB-\u003eactivate();\n$output-\u003eactivate();\n\necho $output-\u003egetOutput() . PHP_EOL; // 0.92545\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevtronic%2Flayerless","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdevtronic%2Flayerless","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevtronic%2Flayerless/lists"}