TorchEI⚡
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
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.
Citation
Our paper is under delivering.
License
MIT License. Copyright©️2022/5/23-present, Hao Zheng.
Metadata
Release files for torchei 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| torchei-1.0.0.tar.gz | 12.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| torchei-1.0.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 23.6 kB
Release files / torchei-1.0.0.tar.gz
| Download URL | torchei-1.0.0.tar.gz |
|---|---|
| Size | 12.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
832def2401bff3542135427da12c83c7e435c1efdde542fa3a3d0df34cef2c78
|
|
BLAKE2b-256 checksum How to use checksums |
b0b6842985da49651f33234da3ffbd14d3db8c84f1cabb250a45057694182558
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.13
|
Release files / torchei-1.0.0-py3-none-any.whl
| Download URL | torchei-1.0.0-py3-none-any.whl |
|---|---|
| Size | 11.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
64a46519fd95beddae6a11eb01a62bd9d29e8af1d728bc54d68404a4d601bef4
|
|
BLAKE2b-256 checksum How to use checksums |
ff63f20c1f462f3bdb6198e6da85197315687ee7372d3d9aa3ab5b7d7ca92db4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.13
|