python白盒测试_DeepXplore 深度学习系统的自动白盒测试

DeepXplore: Systematic DNN testing (SOSP'17)

Prerequisite

Python

The code should be run using python 2.7.12, Tensorflow 1.3.0, Keras 2.0.8, PIL, h5py, and opencv-python

Tensorflow

sudo pip install tensorflow

if you have gpu,

pip install tensorflow-gpu

Keras

pip install keras

To set Keras backend to be tensorflow (two options):

1. Modify ~/.keras/keras.json by setting "backend": "tensorflow"

2. KERAS_BACKEND=tensorflow python gen_diff.py

PIL

pip install Pillow

h5py

pip install h5py

opencv-python

pip install opencv-python

Mimicus

Install from here.

File structure

MNIST - MNIST dataset.

ImageNet - ImageNet dataset.

Driving - Udacity self-driving car dataset.

PDF - Benign/malicious PDFs captured from VirusTotal/Contagio/Google provided by Mimicus.

Drebin - Drebin Android malware dataset.

To run

In every directory

python gen_diff.py

Note

The trained weights are provided in each directory (if required). Drebin's weights are not part of this repo as they are too large to be hosted on GitHub. Download from here and put them in ./Drebin/.

Note that as DeepXplore use randomness for its exploration, you should fix the seed of the random number generator if you want deterministic and reproducable results. An example is shown below.

import numpy as np

import random

random.seed(1)

np.random.seed(1)

Coming soon

How to test your own DNN models.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值