Skip to content

Commit

Permalink
ReLU Added
Browse files Browse the repository at this point in the history
  • Loading branch information
MitchellShibilski-Unkel authored Apr 2, 2024
1 parent 32b4d94 commit c44dd09
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions pyai.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,24 @@ def RNN(w, u, b, x):
yt = 1 / 1 (w * ht + b) ** -1

return yt

def ReLU(x: list, *y: list, **u: list):
X, Y = [], []
for x2 in x:
relu = max(0, x2)
if relu > 0:
X.append(1)
else:
X.append(0)

for y2 in y:
relu = max(0, y2)
if relu > 0:
Y.append(1)
else:
Y.append(0)

return X, Y

class Audio:
def __init__(self, audio: str):
Expand Down

0 comments on commit c44dd09

Please sign in to comment.