LeelaChessZero / lc0

The rewritten engine, originally for tensorflow. Now all other backends have been ported here.
GNU General Public License v3.0
2.47k stars 534 forks source link

Accessing hidden layer activations with python bindings #1407

Open FrugoFruit90 opened 4 years ago

FrugoFruit90 commented 4 years ago

With https://github.com/LeelaChessZero/lc0/pull/1261 I am able to load a model and make predictions by following the example session.

However, I'm interested in the activations of intermediate layers. What is the easiest way to access them? Is it possible to load the weights in Tensorflow or PyTorch?

int8 commented 2 years ago

any progress on that one ?

mooskagh commented 2 years ago

The easiest way to explore the network for now is to convert the network to ONNX format using

./lc0 leela2onnx --input=network.pb --output=network.onnx