Thermodynamic Consistent Neural Networks for Learning Material Interfacial Mechanics