4

GitHub - poopingface/sigmoidcolon: Sigmoid Colon: The biologically inspired acti...

 1 year ago
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.

hankey Sigmoid Colon

fit.png

mnist_accuracy.png

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

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK