-
Notifications
You must be signed in to change notification settings - Fork 35
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
Add an API for third order tensor products #482
Comments
I have the code, for third order products so I can upload it and see how can improve it :). |
@amontoison Do you have a link to what Enzyme is doing for this? |
@wsmoses and @michel2323 can probably better explain than me. |
We discussed about the API for n-th order tensor products with @michel2323 and we think that this API could be relevant: """
tensor_projection(nlp, n, x, directions, args...)
Computes the projection of the n-th derivative of `nlp` at `x` along the specified directions.
# Arguments
- `nlp`: An NLPModel.
- `n::Int`: The order of the derivative to compute.
- `x::AbstractVector`: The point at which the derivative is evaluated.
- `directions::Tuple{Int, Vararg{Int}}`: A tuple of indices specifying the derivative directions
(e.g., `(1, 2)` for a tensor projection along the first and second axes).
- `args...`: A list of vectors, one for each direction specified in `directions`.
# Output
The projection of the n-th derivative of `nlp` at `x` along the specified directions.
"""
function tensor_projection end |
It will be great to have a few routines to compute tensor products.
We can do that with Enzyme.jl and add a backend for it in ADNLPModels.jl.
The text was updated successfully, but these errors were encountered: