feat: identity activation func

This commit is contained in:
Lenoctambule
2026-03-30 05:14:02 +02:00
parent a93bb0a692
commit cc74b62afd

View File

@@ -25,3 +25,11 @@ class LeakyReLU(ActivationFunc):
def derivative(self, x): def derivative(self, x):
return (x > 0) + self.k * (x <= 0) return (x > 0) + self.k * (x <= 0)
class Identity(ActivationFunc):
def __call__(self, x):
return x
def derivative(x):
return 1