Skip to main content

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.

Project description

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

https://github.com/PsycheHalo/fftLoss/

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

fftloss-0.0.1.tar.gz (7.5 kB view details)

Uploaded Source

Built Distribution

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

fftloss-0.0.1-py3-none-any.whl (7.8 kB view details)

Uploaded Python 3

File details

Details for the file fftloss-0.0.1.tar.gz.

File metadata

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

File hashes

Hashes for fftloss-0.0.1.tar.gz
Algorithm Hash digest
SHA256 4d72918f2b2d8e81cfe5fef6a74f8a5cd155616911aee10b2d45c60d99a76786
MD5 6dfdacaca3ab3d879ff1151d829b52f2
BLAKE2b-256 0633ddba89c61db740b4e705c6c108ed2be589dc6109f280e86f3d720a880e66

See more details on using hashes here.

Provenance

The following attestation bundles were made for fftloss-0.0.1.tar.gz:

Publisher: python-publish.yml on PsycheHalo/fftLoss

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

File details

Details for the file fftloss-0.0.1-py3-none-any.whl.

File metadata

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

File hashes

Hashes for fftloss-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 ed07f408139719dd9b852c6db1dfb4925114936291b26086b159a8cc42b42e6e
MD5 5ff7f6660d5b8978a31909d6285ae8fd
BLAKE2b-256 b26b11e575562236f5cd0f9b1725ac23427515d6681a315dbf905d228f901ad4

See more details on using hashes here.

Provenance

The following attestation bundles were made for fftloss-0.0.1-py3-none-any.whl:

Publisher: python-publish.yml on PsycheHalo/fftLoss

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