Dimensionality reduction and width of deep neural networks based on topological degree theory