This repository shows an example of how to use MATLAB to produce post-hoc explanations -- using Grad-CAM -- for two image classification tasks.
- MATLAB 2022b or later
- Deep Learning Toolbox
- Deep Learning Toolbox™ Model for GoogLeNet Network support package
- Parallel Computing Toolbox (only required for training using a GPU)
- Download or clone the repository.
- Open MATLAB.
- Run the
example.mlx
script and inspect results.
- You are encouraged to expand and adapt the example to your needs.
- The choice of pretrained network and hyperparameters (learning rate, mini-batch size, number of epochs, etc.) is merely illustrative.
- You are encouraged to (use Experiment Manager app to) tweak those choices and find a better solution.