Skip to content

Commit

Permalink
added leaky relu, and comments for future funcs
Browse files Browse the repository at this point in the history
  • Loading branch information
TrevorW-code committed Feb 3, 2024
1 parent 00cb306 commit e7f4104
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 1 deletion.
8 changes: 7 additions & 1 deletion ml_code/activation_functions.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# activation functions in pure python

# Leaky Relu
def leaky_relu(x):
return max(0.01*x,x)

# Relu
def relu(x):
return max(0,x)
return max(0,x)

# Softmax
7 changes: 7 additions & 0 deletions ml_code/loss_functions.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Mean Square Error (MSE) / L2 Loss
# Mean Absolute Error (MAE) / L1 Loss
# Binary Cross-Entropy Loss / Log Loss
# Categorical Cross-Entropy Loss - **SparseCategoricalCrossEntropy** (cool)
# Hinge Loss
# Huber Loss / Smooth Mean Absolute Error
# Log Loss
17 changes: 17 additions & 0 deletions ml_code/optimization_functions.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Gradient Descent

# Stochastic Gradient Descent

# Stochastic Gradient Descent With Momentum

# Mini Batch Gradient Descent

# Adagrad (Adaptive Gradient Descent)

# RMS Prop (Root Mean Square)

# AdaDelta

# Adam

# Nadam

0 comments on commit e7f4104

Please sign in to comment.