fftLoss


NamefftLoss JSON
Version 0.0.1 PyPI version JSON
download
home_pageNone
SummaryThe fftLoss @PyTorch is a frequency domain loss function that prevents the problem of weak frequency components being suppressed by strong frequency components when using a regular loss function.
upload_time2025-07-30 13:41:24
maintainerNone
docs_urlNone
authorNone
requires_python>=3.8
licenseNone
keywords fftloss loss pytorch ai neural nn fft
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # fftLoss
The fftLoss @PyTorch is a frequency domain loss function that prevents the problem of weak frequency components being suppressed by strong frequency components when using a regular loss function. 

## 思路说明
在使用MSE等从时域或空域计算的损失函数时,常常得到模糊的结果.这是由于强势频率压制了弱势频率的表达.通过在频域对相位和幅值分别计算差异缓解了这个问题.这使得网络更偏向于生成边缘锐利的结果.

## Install
```bash
pip install fftLoss
```

## Use
```python
from fftLoss import fftLoss
...
loss=fftLoss(input,target,dim=-1,meanOut=True,norm="ortho",absGain=1,angleGain=1)
```

## HomePage
<https://github.com/PsycheHalo/fftLoss/>

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "fftLoss",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": null,
    "keywords": "fftLoss, Loss, PyTorch, AI, neural, NN, FFT",
    "author": null,
    "author_email": "Psyche Halo <Psyche@WinsGod.com>",
    "download_url": "https://files.pythonhosted.org/packages/06/33/ddba89c61db740b4e705c6c108ed2be589dc6109f280e86f3d720a880e66/fftloss-0.0.1.tar.gz",
    "platform": null,
    "description": "# fftLoss\nThe fftLoss @PyTorch is a frequency domain loss function that prevents the problem of weak frequency components being suppressed by strong frequency components when using a regular loss function. \n\n## \u601d\u8def\u8bf4\u660e\n\u5728\u4f7f\u7528MSE\u7b49\u4ece\u65f6\u57df\u6216\u7a7a\u57df\u8ba1\u7b97\u7684\u635f\u5931\u51fd\u6570\u65f6,\u5e38\u5e38\u5f97\u5230\u6a21\u7cca\u7684\u7ed3\u679c.\u8fd9\u662f\u7531\u4e8e\u5f3a\u52bf\u9891\u7387\u538b\u5236\u4e86\u5f31\u52bf\u9891\u7387\u7684\u8868\u8fbe.\u901a\u8fc7\u5728\u9891\u57df\u5bf9\u76f8\u4f4d\u548c\u5e45\u503c\u5206\u522b\u8ba1\u7b97\u5dee\u5f02\u7f13\u89e3\u4e86\u8fd9\u4e2a\u95ee\u9898.\u8fd9\u4f7f\u5f97\u7f51\u7edc\u66f4\u504f\u5411\u4e8e\u751f\u6210\u8fb9\u7f18\u9510\u5229\u7684\u7ed3\u679c.\n\n## Install\n```bash\npip install fftLoss\n```\n\n## Use\n```python\nfrom fftLoss import fftLoss\n...\nloss=fftLoss(input,target,dim=-1,meanOut=True,norm=\"ortho\",absGain=1,angleGain=1)\n```\n\n## HomePage\n<https://github.com/PsycheHalo/fftLoss/>\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "The fftLoss @PyTorch is a frequency domain loss function that prevents the problem of weak frequency components being suppressed by strong frequency components when using a regular loss function. ",
    "version": "0.0.1",
    "project_urls": {
        "Homepage": "https://github.com/PsycheHalo/fftLoss",
        "Issues": "https://github.com/PsycheHalo/fftLoss/issues"
    },
    "split_keywords": [
        "fftloss",
        " loss",
        " pytorch",
        " ai",
        " neural",
        " nn",
        " fft"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "b26b11e575562236f5cd0f9b1725ac23427515d6681a315dbf905d228f901ad4",
                "md5": "5ff7f6660d5b8978a31909d6285ae8fd",
                "sha256": "ed07f408139719dd9b852c6db1dfb4925114936291b26086b159a8cc42b42e6e"
            },
            "downloads": -1,
            "filename": "fftloss-0.0.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "5ff7f6660d5b8978a31909d6285ae8fd",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 7842,
            "upload_time": "2025-07-30T13:41:23",
            "upload_time_iso_8601": "2025-07-30T13:41:23.702768Z",
            "url": "https://files.pythonhosted.org/packages/b2/6b/11e575562236f5cd0f9b1725ac23427515d6681a315dbf905d228f901ad4/fftloss-0.0.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "0633ddba89c61db740b4e705c6c108ed2be589dc6109f280e86f3d720a880e66",
                "md5": "6dfdacaca3ab3d879ff1151d829b52f2",
                "sha256": "4d72918f2b2d8e81cfe5fef6a74f8a5cd155616911aee10b2d45c60d99a76786"
            },
            "downloads": -1,
            "filename": "fftloss-0.0.1.tar.gz",
            "has_sig": false,
            "md5_digest": "6dfdacaca3ab3d879ff1151d829b52f2",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 7480,
            "upload_time": "2025-07-30T13:41:24",
            "upload_time_iso_8601": "2025-07-30T13:41:24.946726Z",
            "url": "https://files.pythonhosted.org/packages/06/33/ddba89c61db740b4e705c6c108ed2be589dc6109f280e86f3d720a880e66/fftloss-0.0.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-07-30 13:41:24",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "PsycheHalo",
    "github_project": "fftLoss",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "fftloss"
}
        
Elapsed time: 0.94956s