google / google/jaxopt

Avoid state.aux=None in state returned by initial_state

Open
#116 3 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Python
Stars
1.1k
Forks
76
Avg merge
2d 21h
Merged PRs (30d)
1

Description

Currently, when `has_aux=True`, `state.aux` is `None` when `state` is returned by `init_state` and `state.aux` is equal to `fun(params, *args, **kwargs)[1]` when `state` is returned by `update`. This is problematic as it can trigger a jit recompilation. One way would be to set `state.aux` to some dummy values of the correct type when returned by `init_state`.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.