We developed a hybrid solver based on physics-informed neural networks and a mixture of grid and Latin hypercube sampling to solve forward and backward modified diffusion equations. We optimized the parameters in the neural networks by considering the squeeze boundary condition and the parameter in the mixed data sampling by adjusting the mixture coefficient. Then,we used a given modified diffusion equation as an example to demonstrate the efficiency of the hybrid solver for forward and backward problems. The neural network results were compared with the numerical solutions, and good agreement with high precision was observed. This hybrid neural network solver can be generalized to other partial differential equations.