diff --git a/README.md b/README.md new file mode 100644 index 0000000..0f082a1 --- /dev/null +++ b/README.md @@ -0,0 +1,35 @@ +## relu_main.py +The relu_main script is used to run and log sparsity collection and optimiser for different relu tuning policies + +### Notes +Assumes the existence of a the following directories: +- ./runlog +- ./runlog/<arch-name< +- ./relu_thresholds +- ./relu_thresholds/<arch-name< +- ./relu_thresholds +- ./relu_thresholds/<arch-name< +- ../../fpgaconvnet-optimiser/fpgaconvnet/optimiser/<arch-name< + +Uses the krish-skipping branches of fpgaconvnet-optimiser and fpgaconvnet-model + + +### Usage +''' +python relu_main.py +''' + +### Flags +- **arch**: model_name +- **relu-policy**: relu policy choice between slowest_node and uniform +- **fixed-hardware**: Uses fixed-hardware and does not run optimiser. Must provide "platform_path", and "optimised_config_path" flags to load fixed hardware +- **normalise-hardware**: Runs optimiser on same DSPs for dense and no skipping windows +- **accuracy_path**: "model_path". For fixed hardware +- **model_path**: Path to sparse .onnx model. +- **platform_path**: Path to platform specs (.toml). For fixed hardware +- **gpu** +- **enable-wandb** + +### Parameters you may want to vary +- **THRESHOLD_INC in relu_main.py**: Amount you want to increase ReLU by for each iteration +- **--gain flag in fpgaconvnet-optimiser cli**: Minimum gain to push fine \ No newline at end of file diff --git a/relu_main.py b/relu_main.py index b02076b..0245fce 100644 --- a/relu_main.py +++ b/relu_main.py @@ -79,7 +79,7 @@ def layer_name_translation(model_name, onnx_name): help='how many runs') - parser.add_argument("--sparsity_path", default="runlog/resnet18/uniform_relu_0.0", type=str, + parser.add_argument("--sparsity_path", default="runlog/resnet18/", type=str, help='Path to sparsity log dir for old sparsity') parser.add_argument("--accuracy_path", default="runlog/resnet18/uniform_accuracy.csv", type=str,