Skip to main content

[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)

Metadata

Release files for torchood 0.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for torchood 0.0.1
File Size Uploaded Provenance
torchood-0.0.1.tar.gz 7.6 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for torchood 0.0.1
File Interpreter ABI Platform
torchood-0.0.1-py3-none-any.whl Python 3 none any Details

Total release size: 15.8 kB

Release files / torchood-0.0.1.tar.gz

Download URL torchood-0.0.1.tar.gz
Size 7.6 kB
Tags Source
SHA-256 checksum
How to use checksums
2b254a7cb001bb822eff11d5e2fc0512a5e665b17db2a283493cc188b02be1ff
BLAKE2b-256 checksum
How to use checksums
067adc31ca4fb7344d0882e5e9b14f516122fbc8f50de6ed2f789e36619384f1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.0.1 CPython/3.11.5

Release files / torchood-0.0.1-py3-none-any.whl

Download URL torchood-0.0.1-py3-none-any.whl
Size 8.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6e6ef8068eb38f9887aa60599c1472fce0533f5cd6db5c9694329ccdf2f8f32e
BLAKE2b-256 checksum
How to use checksums
cf3574d0c976886aa16f011313e43c3cad6cb06254eadfb69a10b7e98cdf32fb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.0.1 CPython/3.11.5

Security for torchood 0.0.1

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.0.1 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page