Resource-Efficient Machine Learning Algorithm Design for On-Implant Neurological Symptom Detection
In this project, we focus on developing an efficient Machine Learning model to process neural data in real time, with low power consumption, small on-chip area and fast inference.
make install # install the Python requirements
Download trajectories from ECoG, and the pre-trained weights. The folder structure should look like:
$drive
|-- data
`-- checkpoints
|
`-- figures
The drive directory should be in the same directory where you run the code. The figures will be generated by run.py and be stored in drive/figures.
In the baseline model and Fixed Point Quantization you can use pre-trained weights by adding --pre-trained=True to the command.
For using the baseline model with no compression run:
python run.py
For applying Fixed Point Quantization run:
python run.py --fixed_pt_quantization=True
For applying Pruning run:
python run.py --pruning=True
For applying Trained Quantization and Weight Sharing run:
python run.py --trained_quantization=True
Note that for Pruning and Trained Quantization and Weight Sharing you need the pre-trained baseline model. Moreover, you cannot use Fixed Point Quantization, Prunning, and Trained Qunatization at the same time.
You can adjust the number of epochs for training in run.py The training can be interupted by ctrl+c and the weights will be saved in checkpoints directory.
In fpoint_quantization.ipynb you can reproduce the results published in the report for the Binarization and Fixed-Point Quantization method.
In pruning.ipynb you can reproduce the results published in the report for the Pruning method.
In trained_quantization.ipynb you can reproduce the results published in the report for the Trained Quantization and Weight Sharing method. Note that as kmeans clustering is not deterministic you might get slightly different esults that the ones in the report.
Chabenat Eugénie : [email protected]
Djambazovska Sara : [email protected]
Mamooler Sepideh : [email protected]