  We describe a method to estimate R\'enyi entanglement entropy of a spin
system, which is based on the replica trick and generative neural networks with
explicit probability estimation. It can be extended to any spin system or
lattice field theory. We demonstrate our method on a one-dimensional quantum
Ising spin chain. As the generative model, we use a hierarchy of autoregressive
networks, allowing us to simulate up to 32 spins. We calculate the second
R\'enyi entropy and its derivative and cross-check our results with the
numerical evaluation of entropy and results available in the literature.
