mirror of
https://github.com/Llewellynvdm/php-ml.git
synced 2024-11-16 10:15:13 +00:00
20 lines
342 B
PHP
20 lines
342 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace Phpml\NeuralNetwork;
|
|
|
|
interface ActivationFunction
|
|
{
|
|
/**
|
|
* @param float|int $value
|
|
*/
|
|
public function compute($value): float;
|
|
|
|
/**
|
|
* @param float|int $value
|
|
* @param float|int $computedvalue
|
|
*/
|
|
public function differentiate($value, $computedvalue): float;
|
|
}
|