Representation learning of dynamic networks