IntrinsicDimension,PersistentHomologyand GeneralizationinNeuralNetworks