Computing Linear Restrictions of Neural Networks