PHP Classes

Layerless: Assemble and process layerless neural networks

Recommend this page to a friend!
  Info   Documentation   View files Files   Install with Composer Install with Composer   Download Download   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
Not enough user ratingsTotal: 76 All time: 10,170 This week: 455Up
Version License PHP version Categories
layerless 1.0.0Custom (specified...5PHP 5, Artificial intelligence
Description 

Author

This package can assemble and process layerless neural networks.

It can assemble different types of neurons with initial values and connect them using synapses.

It can also use the back propagate algorithm to adjust neuron weights by setting target values on the output neurons and recheck the values again.

Picture of Julian Finkler
  Performance   Level  
Name: Julian Finkler <contact>
Classes: 8 packages by
Country: Germany Germany
Age: 31
All time rank: 2916173 in Germany Germany
Week rank: 180 Up12 in Germany Germany Up
Innovation award
Innovation award
Nominee: 3x

Winner: 1x

Documentation

GitHub tag Packagist Travis Packagist

Layerless

Layerless is the new foundation of the legendary mind neural network project

Installation

composer require devtronic/layerless

Usage

<?php

// Import the SinusActivator as Activator
use Devtronic\Layerless\Activator\SinusActivator as Activator;
use Devtronic\Layerless\BiasNeuron;
use Devtronic\Layerless\InputNeuron;
use Devtronic\Layerless\Neuron;
use Devtronic\Layerless\Synapse;

// Load Composer autoload
require_once __DIR__ . '/vendor/autoload.php';

// Create the activator
$activator = new Activator();

// Create 2 Input Neurons and 1 Bias Neuron
$inputA = new InputNeuron(1);
$inputB = new InputNeuron(0);
$bias = new BiasNeuron(1);

// Create 1 Output Neuron
$output = new Neuron($activator);

// Connect the neurons

new Synapse(0.90, $inputA, $output);
new Synapse(0.23, $inputB, $output);
new Synapse(0.50, $bias, $output);

// Activate the neurons
$inputA->activate();
$inputB->activate();
$output->activate();

echo $output->getOutput() . PHP_EOL; // 0.98545

// Back propagate
$target = 0;
$output->calculateDelta($target);
$inputA->calculateDelta();
$inputB->calculateDelta();

$learningRate = 0.2;
$output->updateWeights($learningRate);
$inputA->updateWeights($learningRate);
$inputB->updateWeights($learningRate);

// Re-Check
$inputA->activate();
$inputB->activate();
$output->activate();

echo $output->getOutput() . PHP_EOL; // 0.92545

  Files folder image Files (21)  
File Role Description
Files folder imagesrc (4 files, 1 directory)
Files folder imagetests (5 files, 1 directory)
Accessible without login Plain text file .travis.yml Data Auxiliary data
Accessible without login Plain text file composer.json Data Auxiliary data
Accessible without login Plain text file LICENSE Lic. License text
Accessible without login Plain text file phpunit.xml Data Auxiliary data
Accessible without login Plain text file README.md Doc. Documentation

  Files folder image Files (21)  /  src  
File Role Description
Files folder imageActivator (4 files)
  Plain text file BiasNeuron.php Class Class source
  Plain text file InputNeuron.php Class Class source
  Plain text file Neuron.php Class Class source
  Plain text file Synapse.php Class Class source

  Files folder image Files (21)  /  src  /  Activator  
File Role Description
  Plain text file ActivatorInterface.php Class Class source
  Plain text file SigmoidActivator.php Class Class source
  Plain text file SinusActivator.php Class Class source
  Plain text file TanHActivator.php Class Class source

  Files folder image Files (21)  /  tests  
File Role Description
Files folder imageActivator (3 files)
  Accessible without login Plain text file autoload.php Aux. Auxiliary script
  Plain text file BiasNeuronTest.php Class Class source
  Plain text file InputNeuronTest.php Class Class source
  Plain text file NeuronTest.php Class Class source
  Plain text file SynapseTest.php Class Class source

  Files folder image Files (21)  /  tests  /  Activator  
File Role Description
  Plain text file SigmoidActivatorTest.php Class Class source
  Plain text file SinusActivatorTest.php Class Class source
  Plain text file TanHActivatorTest.php Class Class source

The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page.
Install with Composer Install with Composer
 Version Control Unique User Downloads Download Rankings  
 100%
Total:76
This week:0
All time:10,170
This week:455Up