Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Function that need the full xmat and using the previous result #21

Open
yolhan83 opened this issue Dec 30, 2023 · 0 comments
Open

Function that need the full xmat and using the previous result #21

yolhan83 opened this issue Dec 30, 2023 · 0 comments

Comments

@yolhan83
Copy link

Hello all, just putting here some features I had to manually add in my case, I needed to build an MLP model for a function really hard to compute and compare timings to integrate with vegas, to do so, I had to do
function fun(x;model=model) @tullio xmat[j,i] := x[i][j] res = model(xmat) res[1,:] end
which create a lot of allocation for no reason, I ended up changing the code to allow a function just to be computed as fun(xmat), also, I needed to integrate the error between the function and the model, it would be a lot faster to use the previously derived grid to begin with and there wasn't the option (for exemple, in python you can use the integrator once again and begin with the grid, but you can't sample from the grid which is why I came here).
I just thought being able to use those two options (apply fun on the xmat, use lastly derived grid (result) ) would be cool. Thanks for the package by the way.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant