deepxde icon indicating copy to clipboard operation
deepxde copied to clipboard

How to make the new code work after modifying the source code?

Open chenhong-zhou opened this issue 1 year ago • 1 comments

I slightly modified the source code, but I did not see that the new code worked. What should I do to make the modified code work? Thanks.

chenhong-zhou avatar Apr 17 '23 06:04 chenhong-zhou

I think the first step is to check whether the "import" command imports the modified version of the library or the original one (for example, put print('This is the modified version') into a boundary condition or NN class; or create a new global function inside the module, and if you can execute it then it is the modified version of the library). Then you should make sure that the modified branch of code is executed. For example, there are several _compile_...() methods for various backends, and if you use TF then _compile_pytorch() will not be executed. You could try to insert some logging into your code branch, for example, print('Reached position X') to check whether your code is executed.

kyouma avatar Apr 18 '23 07:04 kyouma