You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello,
I am struggling to define a custom fitting function for use in pyGpufit.
I have already tried several variations, but never had a successful fit, so I would appreciate some help or tips.
If this is the wrong place to present such a problem, please feel free to remove it or let me know.
The function in question is a 2-dimensional parametric ellipse equation, defined as follows:
I followed the documentation when implementing the function. All necessary prerequisites (CUDA, Python, Visual Studio, etc.) are installed. The function was defined as ELLIPSE_2D with ModelID = 13 in the constants.h. The cuda device function, ellipse_2d.cuh containing all partial derivatives was written and thoroughly checked. I have attached it to this issue, please mind that I can't program in C/C++ and thus adapted the gauss2d.cuh device function file.
The .cuh file was included in models.cuh, as well as the switch case was added.
I used CMake GUI to configure the compiler, opened the solution file with Visual Studio 2022 and Re-built the project (I tried Debug and Release configs). No errors were encountered here.
The GpuFit.dll file, as well as the modified gpufit.py files were then used to perform a test fit of this ellipse function. For the actual test fit I modified the gauss2d.py example file, which was included.
I am fairly certain that the issue lies with the custom function, since simply changing the ModelID to another function (from 13 to e.g. 2) in Python with the custom-built library starts fitting, also noticeable in sustained load on the GPU (with a sufficient number of fits). Fitting using the custom function with ModelID = 13 however, will finish within a few seconds, no matter the specified number of fits and always returning the unchanged, initial parameters.
I have included all altered files in a zip file, as well as the testing file in Python. gpufit_issue.zip
Any help or insight would be greatly appreciated!
The text was updated successfully, but these errors were encountered:
Hello,
I am struggling to define a custom fitting function for use in pyGpufit.
I have already tried several variations, but never had a successful fit, so I would appreciate some help or tips.
If this is the wrong place to present such a problem, please feel free to remove it or let me know.
The function in question is a 2-dimensional parametric ellipse equation, defined as follows:
I followed the documentation when implementing the function. All necessary prerequisites (CUDA, Python, Visual Studio, etc.) are installed. The function was defined as ELLIPSE_2D with ModelID = 13 in the constants.h. The cuda device function, ellipse_2d.cuh containing all partial derivatives was written and thoroughly checked. I have attached it to this issue, please mind that I can't program in C/C++ and thus adapted the gauss2d.cuh device function file.
The .cuh file was included in models.cuh, as well as the switch case was added.
I used CMake GUI to configure the compiler, opened the solution file with Visual Studio 2022 and Re-built the project (I tried Debug and Release configs). No errors were encountered here.
The GpuFit.dll file, as well as the modified gpufit.py files were then used to perform a test fit of this ellipse function. For the actual test fit I modified the gauss2d.py example file, which was included.
I am fairly certain that the issue lies with the custom function, since simply changing the ModelID to another function (from 13 to e.g. 2) in Python with the custom-built library starts fitting, also noticeable in sustained load on the GPU (with a sufficient number of fits). Fitting using the custom function with ModelID = 13 however, will finish within a few seconds, no matter the specified number of fits and always returning the unchanged, initial parameters.
I have included all altered files in a zip file, as well as the testing file in Python.
gpufit_issue.zip
Any help or insight would be greatly appreciated!
The text was updated successfully, but these errors were encountered: