Understand Neural Nets better, post 5 of N -- Code Assistant shootout

In a series of previous blogposts [ 1 , 2 , 3 , 4 ] I ran some experiments drawing the boundaries of the polytopes generated by a fully-connected leaky ReLU network while it was getting trained on reproducing an input image. As I tried to scale the experiments to larger networks, I noticed a dramatic slowdown in the code, caused by the calculation of a hash of the activation pattern happening on…