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

Multidimensional Example #13

Open
Downsite opened this issue Jun 12, 2024 · 0 comments
Open

Multidimensional Example #13

Downsite opened this issue Jun 12, 2024 · 0 comments

Comments

@Downsite
Copy link

Downsite commented Jun 12, 2024

It would be nice to expand the README to show how to use autobound with vector-valued inputs and interpret the output.
From looking into the code, I thought that

 import autobound.jax as ab
 import jax.numpy as jnp
 f = lambda x: 1.5*jnp.exp(3.0*x[1]*x[0]) - 25.0*x[0]**2
 trust_region = (jnp.array([0,0]),jnp.array([1,1]))
 x0 = jnp.array([.5,.5])
 bounds = ab.taylor_bounds(f,max_degree=2)(x0,trust_region)

should work, but that runs into issues with dynamic_slice not being implemented.
The following worked:

A= jnp.array([0,1])
B= jnp.array([1,0])
f = lambda x: 1.5*jnp.exp(3.0*jnp.dot(A,x)*jnp.dot(B,x)) - 25*jnp.dot(B,x)**2

Perhaps there is an intended, easier way I am missing?

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