This notebook details how to create PINN using Pytorch. Theres is a custom class I have implemented that should make this in a much easier fashion (There is a lot of indexing when using functorch otherwise).
This code will allow you to create a PINN for the 1D Heat/Diffusion Equation:
You can also run this notebook on github here:
Please see the accompanying blog post here for more information.