4
GitHub - poopingface/sigmoidcolon: Sigmoid Colon: The biologically inspired acti...
source link: https://github.com/poopingface/sigmoidcolon
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
Sigmoid Colon
The biologically inspired activation function. Read our (toilet) paper.
Installation
Install with pip:
pip install sigmoidcolon
Usage
Class version
from torch import nn
from sigmoidcolon import SigmoidColon
model = nn.Sequential(
nn.Linear(784, 64),
SigmoidColon(),
nn.Linear(64, 10),
)
Functional version
from torch import nn
from sigmoidcolon.functional import sigmoidcolon
x = torch.randn(100)
y = sigmoidcolon(x)
Development
Not satisfied with the function? Redo it with:
# install dev requirements
pip install Pillow numpy matplotlib
# run code generation tool
python scripts/codegen.py docs/sigmoidcolon.png
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK