small fix

This commit is contained in:
rsgrinko committed 2023-03-30 00:26:41 +03:00
1 parent 413617d745
commit 8085cd0700
5 files changed
+84 -46

No files matched your search

+20
View File
@@ -33,4 +33,24 @@
$this->value = $value;
return $this;
}
/**
* Метод активации
*
* @param float $value Значение
* @param float $weight Коэффициент синапса
*/
public function activate(float $value, float $weight): self
{
// Умножение значения на коэфициент
$this->value = $value * $weight;
// Гиперболический тангенс
// https://otus.ru/journal/kak-sozdat-nejroset/
// Функция активации
//$this->value = tanh($value * $weight);
return $this;
}
}