Solicitation for Programming Advice

I’m programming Deep Galerkin Method with PyTorch and have already implemented it for solving the heat equation.

The question remains how to solve a system of PDEs with 2 or more unknown functions, like the forward-backward equations as follow:

Edit: I realized that the 2 unknown functions should be replaced by 2 neural networks, or be rewritten as a master equation then be solved via DGM, the paper I read doesn’t point out this fact before.