Skip to main content

implement of local laplace filter algorithm

Project description

[torchood]: pytorch implementation for universal out of distribution methods

pip install torchood

Support Methods

Support Methods Source
Robust Classification with Convolutional Prototype Learning (Prototype Networks) CVPR 2018: Rbust classification with convolutional prototype learning
Predictive Uncertainty Estimation via Prior Networks(Prior Networks) NeurIPS 2018: Predictive Uncertainty Estimation via Prior Networks
Evidential Deep Learning to Quantify Classification Uncertainty (EDL) NeurIPS 2018: Evidential Deep Learning to Quantify Classification Uncertainty
Posterior Network (PostNet) NeurIPS 2020: Posterior Network: Uncertainty Estimation without OOD Samples via Density-Based Pseudo-Counts
Evidential Neural Network (ENN) NeurIPS 2018: Evidential Deep Learning to Quantify Classification Uncertainty
Evidence Reconciled Neural Network(ERNN) MICCAI 2023: Evidence Reconciled Neural Network for Out-of-Distribution Detection in Medical Images
Redundancy Removing Evidential Neural Network(R2ENN) -

Usage

pip install torchood
import torchood

class UserDefineModel(nn.Module):
    ...

classifier = UserDefineModel(...)
classifier = torchood.EvidenceNeuralNetwork(classifier)

Train

for data, label in train_loader:
    # transform data & label to correct device
    # ...

    _, evidence, _ = classifier(data)
    loss = classifier.criterion(evidence, label)

    optimizer.zero_grad()
    loss.backward()
    optimizer.step()

Infer

prob, uncertainty = classifier.predict(inputs)

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

torchood-0.0.1.tar.gz (7.6 kB view details)

Uploaded Source

Built Distribution

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

torchood-0.0.1-py3-none-any.whl (8.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: torchood-0.0.1.tar.gz
  • Upload date:
  • Size: 7.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.11.5

File hashes

Hashes for torchood-0.0.1.tar.gz
Algorithm Hash digest
SHA256 2b254a7cb001bb822eff11d5e2fc0512a5e665b17db2a283493cc188b02be1ff
MD5 0813a1b5082a54cc84aaec03565a157f
BLAKE2b-256 067adc31ca4fb7344d0882e5e9b14f516122fbc8f50de6ed2f789e36619384f1

See more details on using hashes here.

File details

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

File metadata

  • Download URL: torchood-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 8.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.11.5

File hashes

Hashes for torchood-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 6e6ef8068eb38f9887aa60599c1472fce0533f5cd6db5c9694329ccdf2f8f32e
MD5 872a3028586954b8c0a796bcf83355f9
BLAKE2b-256 cf3574d0c976886aa16f011313e43c3cad6cb06254eadfb69a10b7e98cdf32fb

See more details on using hashes here.

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