Skip to main content
torchei_logo

TorchEI⚡

IntroUsageDocCiteContributionLicense

中文

Introduction

👋TorchEI, pronounced*/ˈtôrCHər/*(like torture), short for Pytorch Error Injection, is a high-speed toolbox for DNN Reliability's Research and Development. TorchEI enables you quickly and simply inject errors into DNN, collects information you needed, and harden your DNN.

Features

  • Full typing system supported
  • Implemented methods from papers
  • Highly customizable

Quick Example

Here we gonna show you a quick example, or you can try interactive demo and online editor.

Installing

Install public distribution using pip3 install torchei or download it.

Example

Init fault model

import torch
from torchvision import models
import torchei
model = models.resnet18(pretrained=True)
data = torch.load('data/ilsvrc_valid8.pt')
fault_model = torchei.fault_model(model,data)

Calc reliability using emat method

fault_model.emat_attack(10,1e-3)

Calc reliability using SERN

fault_model.sern_calc(output_class=1000)

Harden DNN by ODR

fault_model.outlierDR_protection()
fault_model.emat_attack(10,1e-3)

Contribution

contributors

If you found🧐 any bugs or have🖐️ any suggestions, please tell us.

This repo is open to everyone wants to maintain together.

You can helps us with follow things:

  • PR your implemented methods in your or others' papers
  • Complete our project
  • Translate our docs to your language
  • Other

We want to build TorchEI to best toolbox in DNN Reliability for bit flip, adversarial attack, and others.

:e-mail: forcessless@foxmail.com

Citation

Our paper is under delivering.

License

MIT License. Copyright:copyright:2022/5/23-present, Hao Zheng.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

torchei-0.1.1.tar.gz (12.1 kB view details)

Uploaded Source

Built Distribution

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

torchei-0.1.1-py3-none-any.whl (11.1 kB view details)

Uploaded Python 3

File details

Details for the file torchei-0.1.1.tar.gz.

File metadata

  • Download URL: torchei-0.1.1.tar.gz
  • Upload date:
  • Size: 12.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.13

File hashes

Hashes for torchei-0.1.1.tar.gz
Algorithm Hash digest
SHA256 50c8598ab919c92483f388c69f8ddc70a459f94884eb4d657662ee21b0a931d0
MD5 5f11353cf60c5720ac8c18da19e91f4e
BLAKE2b-256 f09752fce52ff298951fda59ed09d975617a1f2670cd39569c899cac114e2eec

See more details on using hashes here.

File details

Details for the file torchei-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: torchei-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 11.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.13

File hashes

Hashes for torchei-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 3822af0272be5705abe6cdb825e7ff9b218e6ade3decb5221336b9c4fce2a758
MD5 3a3cbf633cb51083ec252adbae684a16
BLAKE2b-256 1fcd47d205edb92fa1d216cd154cc9eb55e8af05a7c84c48e2877cdfe3303731

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