| Name | FWU JSON |
| Version |
0.0.4
JSON |
| download |
| home_page | None |
| Summary | 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. |
| upload_time | 2025-08-29 07:32:45 |
| maintainer | None |
| docs_url | None |
| author | None |
| requires_python | >=3.8 |
| license | None |
| keywords |
fwu
fwlu
fwmu
pytorch
ai
neural
nn
unit
|
| VCS |
 |
| bugtrack_url |
|
| requirements |
No requirements were recorded.
|
| Travis-CI |
No Travis.
|
| coveralls test coverage |
No coveralls.
|
# 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.


## 思路说明
ReLU滤除了小于零的输入,虽然高效实现了非线性,但对小于零的输入无梯度回传,导致了神经元坏死.目前有多种模仿ReLU的平滑版激活函数,通过在输入刚小于零时提供显著的反向梯度、在梯度更小时也提供微小的梯度,部分缓解了ReLU中神经元坏死的问题.
FWU系列直接输入的符号将输入分为>0和<0两部分,分别送入两个单元(Linear或Conv或其他),再对两个单元的输出做二元运算(加法或乘法或其他).即提供了非线性,又最大程度上利用信息完全杜绝了神经元坏死.
目前提供了加法(FWLU)和乘法(FWMU)的Linear、Conv1d、Conv2d、和对应转置卷积的实现.无后缀代表Linear,1D、2D后缀代表对应维度的卷积,加T后缀代表转置卷积.
部分参数,如kernel_size、padding可以通过加_N后缀实现对负分支的专门控制.用以对正负分支添加不同的前后偏移或使用不同宽高比的卷积核,可以减少参数量增大感受野.
## Install
```bash
pip install FWU
```
## Use
```python
from FWU import FWLU2DT
...
```
import后直接替代对应的Linear、Conv1d、Conv2d等,并取消与其组合的激活函数(输出层的SoftMax等承担特殊功能的激活函数除外).
## HomePage
<https://github.com/PsycheHalo/FWU/>
Raw data
{
"_id": null,
"home_page": null,
"name": "FWU",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.8",
"maintainer_email": null,
"keywords": "FWU, FWLU, FWMU, PyTorch, AI, neural, NN, unit",
"author": null,
"author_email": "Psyche Halo <Psyche@WinsGod.com>",
"download_url": "https://files.pythonhosted.org/packages/f4/22/92ad37df2d4931ef78b0247cc4f68ea611d4f87f82b0b20b5b7396026a3a/fwu-0.0.4.tar.gz",
"platform": null,
"description": "# FWU\nFWU 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.\n\n\n\n\n## \u601d\u8def\u8bf4\u660e\nReLU\u6ee4\u9664\u4e86\u5c0f\u4e8e\u96f6\u7684\u8f93\u5165,\u867d\u7136\u9ad8\u6548\u5b9e\u73b0\u4e86\u975e\u7ebf\u6027,\u4f46\u5bf9\u5c0f\u4e8e\u96f6\u7684\u8f93\u5165\u65e0\u68af\u5ea6\u56de\u4f20,\u5bfc\u81f4\u4e86\u795e\u7ecf\u5143\u574f\u6b7b.\u76ee\u524d\u6709\u591a\u79cd\u6a21\u4effReLU\u7684\u5e73\u6ed1\u7248\u6fc0\u6d3b\u51fd\u6570,\u901a\u8fc7\u5728\u8f93\u5165\u521a\u5c0f\u4e8e\u96f6\u65f6\u63d0\u4f9b\u663e\u8457\u7684\u53cd\u5411\u68af\u5ea6\u3001\u5728\u68af\u5ea6\u66f4\u5c0f\u65f6\u4e5f\u63d0\u4f9b\u5fae\u5c0f\u7684\u68af\u5ea6,\u90e8\u5206\u7f13\u89e3\u4e86ReLU\u4e2d\u795e\u7ecf\u5143\u574f\u6b7b\u7684\u95ee\u9898.\nFWU\u7cfb\u5217\u76f4\u63a5\u8f93\u5165\u7684\u7b26\u53f7\u5c06\u8f93\u5165\u5206\u4e3a>0\u548c<0\u4e24\u90e8\u5206,\u5206\u522b\u9001\u5165\u4e24\u4e2a\u5355\u5143(Linear\u6216Conv\u6216\u5176\u4ed6),\u518d\u5bf9\u4e24\u4e2a\u5355\u5143\u7684\u8f93\u51fa\u505a\u4e8c\u5143\u8fd0\u7b97(\u52a0\u6cd5\u6216\u4e58\u6cd5\u6216\u5176\u4ed6).\u5373\u63d0\u4f9b\u4e86\u975e\u7ebf\u6027,\u53c8\u6700\u5927\u7a0b\u5ea6\u4e0a\u5229\u7528\u4fe1\u606f\u5b8c\u5168\u675c\u7edd\u4e86\u795e\u7ecf\u5143\u574f\u6b7b.\n\n\u76ee\u524d\u63d0\u4f9b\u4e86\u52a0\u6cd5(FWLU)\u548c\u4e58\u6cd5(FWMU)\u7684Linear\u3001Conv1d\u3001Conv2d\u3001\u548c\u5bf9\u5e94\u8f6c\u7f6e\u5377\u79ef\u7684\u5b9e\u73b0.\u65e0\u540e\u7f00\u4ee3\u8868Linear,1D\u30012D\u540e\u7f00\u4ee3\u8868\u5bf9\u5e94\u7ef4\u5ea6\u7684\u5377\u79ef,\u52a0T\u540e\u7f00\u4ee3\u8868\u8f6c\u7f6e\u5377\u79ef.\n\n\u90e8\u5206\u53c2\u6570,\u5982kernel_size\u3001padding\u53ef\u4ee5\u901a\u8fc7\u52a0_N\u540e\u7f00\u5b9e\u73b0\u5bf9\u8d1f\u5206\u652f\u7684\u4e13\u95e8\u63a7\u5236.\u7528\u4ee5\u5bf9\u6b63\u8d1f\u5206\u652f\u6dfb\u52a0\u4e0d\u540c\u7684\u524d\u540e\u504f\u79fb\u6216\u4f7f\u7528\u4e0d\u540c\u5bbd\u9ad8\u6bd4\u7684\u5377\u79ef\u6838,\u53ef\u4ee5\u51cf\u5c11\u53c2\u6570\u91cf\u589e\u5927\u611f\u53d7\u91ce.\n\n## Install\n```bash\npip install FWU\n```\n\n## Use\n```python\nfrom FWU import FWLU2DT\n...\n```\nimport\u540e\u76f4\u63a5\u66ff\u4ee3\u5bf9\u5e94\u7684Linear\u3001Conv1d\u3001Conv2d\u7b49,\u5e76\u53d6\u6d88\u4e0e\u5176\u7ec4\u5408\u7684\u6fc0\u6d3b\u51fd\u6570(\u8f93\u51fa\u5c42\u7684SoftMax\u7b49\u627f\u62c5\u7279\u6b8a\u529f\u80fd\u7684\u6fc0\u6d3b\u51fd\u6570\u9664\u5916).\n\n## HomePage\n<https://github.com/PsycheHalo/FWU/>\n",
"bugtrack_url": null,
"license": null,
"summary": "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. ",
"version": "0.0.4",
"project_urls": {
"Homepage": "https://github.com/PsycheHalo/FWU",
"Issues": "https://github.com/PsycheHalo/FWU/issues"
},
"split_keywords": [
"fwu",
" fwlu",
" fwmu",
" pytorch",
" ai",
" neural",
" nn",
" unit"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "dc3fccd64783001f166c73f4a6bf46583dca1da813251a2ca531c459c9c27648",
"md5": "6216fc8be631e30f9eb4cfb497082804",
"sha256": "7e18876dd63ae16f66905a5bca37f3465b8e20c69f8c526b6226d28ea2a3bfc7"
},
"downloads": -1,
"filename": "fwu-0.0.4-py3-none-any.whl",
"has_sig": false,
"md5_digest": "6216fc8be631e30f9eb4cfb497082804",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8",
"size": 15517,
"upload_time": "2025-08-29T07:32:44",
"upload_time_iso_8601": "2025-08-29T07:32:44.416213Z",
"url": "https://files.pythonhosted.org/packages/dc/3f/ccd64783001f166c73f4a6bf46583dca1da813251a2ca531c459c9c27648/fwu-0.0.4-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "f42292ad37df2d4931ef78b0247cc4f68ea611d4f87f82b0b20b5b7396026a3a",
"md5": "21ffadf2afa422dc5666d3253c8e41e8",
"sha256": "96d35e39b15f93eca45c3fab1789b4e08b9fed6c128010f3372a96e7f5ca9e75"
},
"downloads": -1,
"filename": "fwu-0.0.4.tar.gz",
"has_sig": false,
"md5_digest": "21ffadf2afa422dc5666d3253c8e41e8",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8",
"size": 10979,
"upload_time": "2025-08-29T07:32:45",
"upload_time_iso_8601": "2025-08-29T07:32:45.882372Z",
"url": "https://files.pythonhosted.org/packages/f4/22/92ad37df2d4931ef78b0247cc4f68ea611d4f87f82b0b20b5b7396026a3a/fwu-0.0.4.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-08-29 07:32:45",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "PsycheHalo",
"github_project": "FWU",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "fwu"
}