PDGM: a Neural Network Approach to Solve Path-Dependent Partial Differential Equations