Torsion in Persistent Homology and Neural Networks