Skip to main content

FWU is a series of PyTorch-based neural network units. It has higher information utilization, prevents neuronal necrosis, and eliminates the need to add additionall activation functions.

Project description

FWU

FWU is a series of PyTorch-based neural network units.It has higher information utilization, prevents neuronal necrosis, and eliminates the need to add additionall activation functions.

image image

思路说明

ReLU滤除了小于零的输入,虽然高效实现了非线性,但对小于零的输入无梯度回传,导致了神经元坏死.目前有多种模仿ReLU的平滑版激活函数,通过在输入刚小于零时提供显著的反向梯度、在梯度更小时也提供微小的梯度,部分缓解了ReLU中神经元坏死的问题. FWU系列直接输入的符号将输入分为>0和<0两部分,分别送入两个单元(Linear或Conv或其他),再对两个单元的输出做二元运算(加法或乘法或其他).即提供了非线性,又最大程度上利用信息完全杜绝了神经元坏死.

目前提供了加法(FWLU)和乘法(FWMU)的Linear、Conv1d、Conv2d、和对应转置卷积的实现.无后缀代表Linear,1D、2D后缀代表对应维度的卷积,加T后缀代表转置卷积.

Install

pip install FWU

Use

from FWU import FWLU2DT
...

import后直接替代对应的Linear、Conv1d、Conv2d等,并取消与其组合的激活函数(输出层的SoftMax等承担特殊功能的激活函数除外).

HomePage

https://github.com/PsycheHalo/FWU/

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

fwu-0.0.2.tar.gz (10.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

fwu-0.0.2-py3-none-any.whl (13.6 kB view details)

Uploaded Python 3

File details

Details for the file fwu-0.0.2.tar.gz.

File metadata

  • Download URL: fwu-0.0.2.tar.gz
  • Upload date:
  • Size: 10.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for fwu-0.0.2.tar.gz
Algorithm Hash digest
SHA256 6bc19c88eb561523d49ecf1367a505d0e81f52c42c359e61b5ccdc09d9d0fad6
MD5 d7c3eb04145613b5b20ad0ab7b26a03d
BLAKE2b-256 54656adb16683a270b955fbcce1b071b87a78601dcd70037c3848ac42cd7efda

See more details on using hashes here.

Provenance

The following attestation bundles were made for fwu-0.0.2.tar.gz:

Publisher: python-publish.yml on PsycheHalo/FWU

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file fwu-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: fwu-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 13.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for fwu-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 8eb2b0c701233e8302471f459c10c9b72bd843838cd07199345abc9eade0c36b
MD5 2449f09a8f05e037d9a421e6278c08b8
BLAKE2b-256 41bfe6a3057c076e3ab6b86a8824fcaa61c0f69084f5e950445c745912f3728d

See more details on using hashes here.

Provenance

The following attestation bundles were made for fwu-0.0.2-py3-none-any.whl:

Publisher: python-publish.yml on PsycheHalo/FWU

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page