A representer theorem for deep neural networks