Skip to content

Multidimensional Example #13

Description

@Downsite

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions