I'm completely new to pytorch (I looked at it for several hours today). To put it in a neutral manner, it seems to have a rather high tolerance for complexity and relying on dozens of external packages, including
pybind11. Memory leaks included, as a cursory Google search reveals.
I hope this new style of writing Python packages does not leak into the interpreter.