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
pip install fftLoss
Use
from fftLoss import fftLoss
...
loss=fftLoss(input,target,dim=-1,meanOut=True,norm="ortho",absGain=1,angleGain=1)
HomePage
Metadata
Release files for fftLoss 0.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| fftloss-0.0.1.tar.gz | 7.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| fftloss-0.0.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 15.3 kB
Release files / fftloss-0.0.1.tar.gz
| Download URL | fftloss-0.0.1.tar.gz |
|---|---|
| Size | 7.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4d72918f2b2d8e81cfe5fef6a74f8a5cd155616911aee10b2d45c60d99a76786
|
|
BLAKE2b-256 checksum How to use checksums |
0633ddba89c61db740b4e705c6c108ed2be589dc6109f280e86f3d720a880e66
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 30, 2025.
Transparency logRelease files / fftloss-0.0.1-py3-none-any.whl
| Download URL | fftloss-0.0.1-py3-none-any.whl |
|---|---|
| Size | 7.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ed07f408139719dd9b852c6db1dfb4925114936291b26086b159a8cc42b42e6e
|
|
BLAKE2b-256 checksum How to use checksums |
b26b11e575562236f5cd0f9b1725ac23427515d6681a315dbf905d228f901ad4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 30, 2025.
Transparency log