-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3 from DependableSystemsLab/supportCNN
minor changes on the DNN tests
- Loading branch information
Showing
14 changed files
with
122 additions
and
131 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -63,6 +63,8 @@ | |
|
||
2. Follow the instruction to configure the configuration file. By default, it's in the /confFiles/default.yaml file (including the instructions). | ||
|
||
3. Run the program and you can observe the output of the ML model under fault. | ||
|
||
|
||
|
||
**Questions ? Contact Karthik Pattabiraman ([email protected])** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
# This is a sample YAML file for fault injection configuration | ||
# The fields here should correspond to the Fields in fiConfig.py | ||
|
||
# Deterministic fault seed for the injections | ||
# Seed: 1000 | ||
|
||
# Type of fault to be injected for Scalars and Tensors | ||
# Allowed values are: {None, Rand, Zero, Rand-element, bitFlip-element, bitFlip-tensor} | ||
# 1) None - do not inject fault | ||
# 2) Rand - shuffle all the data items in the output of the target op into random values | ||
# 3) Zero - change the value into all zeros | ||
# 4) Rand-element - shuffle one of the data item in the output of the target op into random value | ||
# 5) bitFlip-element - single bit-flip over one data item in the output of the target op | ||
# 6) bitFlip-tensor - single bit-flip over all data items in the output of the target op | ||
ScalarFaultType: None | ||
TensorFaultType: bitFlip-element | ||
#TensorFaultType: None | ||
|
||
# Add the list of Operations and their probabilities here | ||
# Each entry must be in a separate line ad start with a '-' | ||
# each line must represent an OP and it's probability value | ||
# See fiConfig.py for a full list of allowed OP values | ||
# NOTE: These should not be any tabs anywhere below | ||
|
||
Ops: | ||
# Choose operations which you want to inject | ||
- ALL = 1.0 # Chooses all operations | ||
# - LRN = 1.0 # Choose one operation only; | ||
# - EQUAL = 1.0 | ||
# - SOFT-MAX = 1.0 | ||
# - DIV = 0.0 # This does not exist - and should be ignored (Test) | ||
# - SUB = -0.5 # This should raise an exception | ||
|
||
# How many times the set of above operations should be skipped before injection | ||
# SkipCount: 1 | ||
|
||
|
||
# Specify the instances of the ML operators | ||
# This is required when you want to specify which operator to inject (e.g., the second Conv operator). | ||
# Below is an example, you need to specify the numbers according to your model. | ||
Instances: | ||
- CONV2D = 2 # This means there are two conv2d operations in the model | ||
- MAX-POOL = 2 | ||
- RELU = 3 | ||
- BIASADD = 2 | ||
- RESHAPE = 1 | ||
- ADD = 3 | ||
- MATMUL = 3 | ||
|
||
|
||
|
||
# There are three inject mode: | ||
# There are 3 ways to determine HOW to select an operation for injection" | ||
# 1) Using error rate to determine the probability of each opertaor to be injected " | ||
# 2) Profiling the instance of each operation so that each operation will be injected for ONCE only" | ||
# 3) Perform random injection over one op per run". In this mode, the 'ALL' variable in the Ops section must be used explicitly. | ||
# In the second and third mode, you'll need to specify the instances of all the operators in the algorithm | ||
|
||
# Allowed values: 1) "errorRate"; 2) "dynamicInstance"; 3) "oneFaultPerRun" | ||
InjectMode: "errorRate" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1 @@ | ||
# Autopilot-TensorFlow | ||
A TensorFlow implementation of this [Nvidia paper](https://arxiv.org/pdf/1604.07316.pdf) with some changes. For a summary of the design process and FAQs, see [this medium article I wrote](https://medium.com/@sullyfchen/how-a-high-school-junior-made-a-self-driving-car-705fa9b6e860). | ||
|
||
# IMPORTANT | ||
Absolutely, under NO circumstance, should one ever pilot a car using computer vision software trained with this code (or any home made software for that matter). It is extremely dangerous to use your own self-driving software in a car, even if you think you know what you're doing, not to mention it is quite illegal in most places and any accidents will land you in huge lawsuits. | ||
|
||
This code is purely for research and statistics, absolutley NOT for application or testing of any sort. | ||
|
||
# How to Use | ||
Download the [dataset](https://github.com/SullyChen/driving-datasets) and extract into the repository folder | ||
|
||
Use `python train.py` to train the model | ||
|
||
Use `python run.py` to run the model on a live webcam feed | ||
|
||
Use `python run_dataset.py` to run the model on the dataset | ||
|
||
To visualize training using Tensorboard use `tensorboard --logdir=./logs`, then open http://0.0.0.0:6006/ into your web browser. | ||
|
||
# Cited in | ||
Pan, X., You, Y., Wang, Z., & Lu, C. (2017, September 26). Virtual to Real Reinforcement Learning for Autonomous Driving. Retrieved from [https://arxiv.org/abs/1704.03952](https://arxiv.org/pdf/1704.03952.pdf) | ||
|
||
https://medium.com/@maxdeutsch/how-to-build-a-self-driving-car-in-one-month-d52df48f5b07 | ||
This implementation is based on the one from https://github.com/SullyChen/Autopilot-TensorFlow, and we change the original Dave model to the comma ai's steering model. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.