Skip to main content

core.exact_fits

core.exact_fits(caps, event_size, /, *, strategy='reverse-mode', n_params=None)

Whether n_samples=None gives the exact output covariance by strategy.

The budgets steer the default only: an explicit n_samples=None is always exact.

Parameters

Name Type Description Default
caps Capabilities The model’s capabilities. required
event_size int | None Output entries per input \(E\). None (not known yet) checks the capabilities only. required
strategy Strategy The pushforward. "reverse-mode" needs vjp and vmap and \(E \le\) MAX_DENSE_EVENT. "forward-mode" needs jvp and vmap and \(E P \le\) MAX_DENSE_EVENT squared, the entry budget of the vjp path’s dense \([E, E]\) blocks. 'reverse-mode'
n_params int | None The number of parameters \(P\). None

Returns

Name Type Description
bool Whether caps and the budget allow the exact path.

Raises

Name Type Description
ValueError strategy="forward-mode" with a known event_size and no n_params.