From cc74b62afd364b9e436985ff60ec612583ca8826 Mon Sep 17 00:00:00 2001 From: Lenoctambule <106790775+lenoctambule@users.noreply.github.com> Date: Mon, 30 Mar 2026 05:14:02 +0200 Subject: [PATCH] feat: identity activation func --- activations.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/activations.py b/activations.py index fa2a6d9..5b1d061 100644 --- a/activations.py +++ b/activations.py @@ -25,3 +25,11 @@ class LeakyReLU(ActivationFunc): def derivative(self, x): return (x > 0) + self.k * (x <= 0) + + +class Identity(ActivationFunc): + def __call__(self, x): + return x + + def derivative(x): + return 1