user4362: I am interested in doing some analyses of chess games using the neural network trained for Lc0. To that end I need to be able to turn PGN into the right kind of input vectors and to load and use the neural network trained for Leela chess. 
My question is whether there is python code for this somewhere. Especially for the first step, using the neural network shouldn't be a problem. 
Alternatively an explanation of how the input vectors are computed might enable me to write it myself. 

user20721: Python utilities for experimenting with Leela Chess Zero a neural network based chess engine: https://github.com/glinscott/leela-chess/
Here: https://github.com/so-much-meta/lczero_tools
This allows you to run the network in Python on specific board positions via python-chess, and get policy/value outputs. (Works with pytorch, and is also able to run the network using the tfprocess training module included in Leela).
https://github.com/dkappe/leela-chess-weights/wiki/Supervised-Learning
A newer, faster tool for converting pgn to training data can be found here.

4362: <p>I am interested in doing some analyses of chess games using the neural network trained for Lc0. To that end I need to be able to turn PGN into the right kind of input vectors and to load and use the neural network trained for Leela chess. </p>

<p>My question is whether there is python code for this somewhere. Especially for the first step, using the neural network shouldn't be a problem. </p>

<p>Alternatively an explanation of how the input vectors are computed might enable me to write it myself. </p>
 20721: <p>Python utilities for experimenting with Leela Chess Zero a neural network based chess engine: <a href="https://github.com/glinscott/leela-chess/" rel="noreferrer">https://github.com/glinscott/leela-chess/</a></p>

<p>Here: <a href="https://github.com/so-much-meta/lczero_tools" rel="noreferrer">https://github.com/so-much-meta/lczero_tools</a>
This allows you to run the network in Python on specific board positions via python-chess, and get policy/value outputs. (Works with pytorch, and is also able to run the network using the tfprocess training module included in Leela).</p>

<p><a href="https://github.com/dkappe/leela-chess-weights/wiki/Supervised-Learning" rel="noreferrer">https://github.com/dkappe/leela-chess-weights/wiki/Supervised-Learning</a>
A newer, faster tool for converting pgn to training data can be found here.</p>
