Improving the deep learning backend