Skip to content
Discussion options

You must be logged in to vote

I think in_axes is what you're looking for:

def inner_function(x, y):
    return x*y

@jit
def outer_function(X, y_):
    vmapped_function = vmap(inner_function, in_axes=(0, None))
    return vmapped_function(X, y_)

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@aniquetahir
Comment options

Answer selected by aniquetahir
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants