Shaping a neural network like marble