philipschw / mlpSolver

Full-history Recursive Multilevel Picard Approximation Solver for High-Dimensional Semilinear Parabolic PDEs.
MIT License
2 stars 0 forks source link

An issue about converting training_history to arrary in MLPlogging #1

Closed Francis-Fan-create closed 5 months ago

Francis-Fan-create commented 5 months ago

When I was executing main.py, the following situation happened: "...\code\mlpSolver-master\solver.py", line 197, in MLPlogging errors = self.errors(np.array(training_history)[:,1]) ValueError: setting an array element with a sequence. The requested array has an inhomogeneous shape after 2 dimensions. The detected shape was (1, 4) + inhomogeneous part.

philipschw commented 5 months ago

I executed the code again and couldn't reproduce the error. Which equation did you run? I think it's probably a problem with the numpy package versions you used on your system. I had no problems with Python 3.9.1 and

Package Version


numpy 1.22.4

I can help you further if you provide me with more information such as package versions, Python version etc. Best

Francis-Fan-create commented 5 months ago

Thanks for your help! I updated my numpy to 1.22.4 and the problem was solved. By the way, is this algorithm parallelizable? If I run the code on GPU, will it be faster than CPU? Or, is it possible to do so by modifying the code, in principle?

philipschw commented 5 months ago
Francis-Fan-create commented 5 months ago

I want to use a multiprocess grad MLP solver on multiple (t,x) on another PDE not included in the examples and compare its performance with other solvers. I would like to directly use MLP solver to evaluate the solution without reading and writing config files in main.py for every point. Is it possible to do so? If so, what changes should I make to use such a solver on the PDE I am concerned about? (I am just a beginner in this field, so thx for your patience in advance.)

philipschw commented 5 months ago