Force1ess / TorchEI

TorchEI is a high-speed toolbox around DNN Reliability's Research and Development

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

torchei_logo

TorchEI⚡

IntroUsageDocCiteContributionLicense

Introduction

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

TorchEI implemented incredible parallel evaluation system which could allow you adequately utilize device computing performance with tolerance to non-catastrophic faults.

Features

  • Full typing system supported
  • Contains methods from papers in DNN Reliability
  • High-efficiency, fault-tolerant parallel system

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('./datasets/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 Parallel Mechanism (under developing)

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)

Contributioncontributors

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 around bit flip, adversarial attack, and others. 📧 forcessless@foxmail.com

Citation

Our paper is under reviewing.

License

MIT License. Copyright©️2022/5/23-present, Hao Zheng.

About

TorchEI is a high-speed toolbox around DNN Reliability's Research and Development

License:MIT License


Languages

Language:Jupyter Notebook 96.8%Language:Python 3.2%