Skip to content

Instantly share code, notes, and snippets.

@Eeman1113
Created May 22, 2024 20:48
Show Gist options
  • Save Eeman1113/dd31c100763050cc3980557748307729 to your computer and use it in GitHub Desktop.
Save Eeman1113/dd31c100763050cc3980557748307729 to your computer and use it in GitHub Desktop.
from .module import Module
import math
class Sigmoid(Module):
def __init__(self):
super().__init__()
def forward(self, x):
return 1.0 / (1.0 + (math.e) ** (-x))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment