Coarse graining molecular dynamics with graph neural networks