Might be a faster way https://github.com/marbleton/FPGA_MNIST/blob/6555feb45d01be05ffa8c043cd5ebc2e712df655/net/util.py#L347
Might be a faster way
https://github.com/marbleton/FPGA_MNIST/blob/6555feb45d01be05ffa8c043cd5ebc2e712df655/net/util.py#L347