Compositional Learning of Dynamical System Models Using Port-Hamiltonian Neural Networks