Visualizes attention layer activations of lc0 attention body nets as heatmaps.
- Clone this repo:
git clone https://github.com/costantinoai/lc0-attention-visualizer.git lc0-attention-visualizer
cd lc0-attention-visualizer
- Create conda environment and install dependencies for lczero-training and attention visualizer:
conda create --name attention-visualizer --file requirements.txt
- Clone and setup attention-net-body branch of lczero-training:
git clone -b master https://github.com/ergodice/lczero-training.git lczero-training
cd lczero-training
sh init.sh
cd ..
-
Prepare model folder where visualizer can read attention models from:
- Create folder called
models
- place at least one model folder inside models folder that containts at least one attention body net and config.yaml for that net architecture
- In the end folder structure could look like:
lc0-attention-visualizer/ models/ architecture1/ cfg.yaml BT1024-3142c-swa-186000.pb.gz BT1024-rl-lowlr-swa-236500.pb.gz architecture2/ cfg.yaml modelxxx.pb.gz run.py ...
- Add
return_attn_wts: true
undermodel
in the configuration file
- Create folder called
-
Run the gui
python run.py
GUI should soon launch in your default browser.