Skip to content

Instantly share code, notes, and snippets.

@mwitiderrick
Last active December 18, 2023 13:58
Show Gist options
  • Save mwitiderrick/14a1a8a629ffb1b418fa23f046cf6420 to your computer and use it in GitHub Desktop.
Save mwitiderrick/14a1a8a629ffb1b418fa23f046cf6420 to your computer and use it in GitHub Desktop.
@jax.jit
def eval_step(state, batch):
images, labels = batch
logits = CNN().apply({'params': state.params}, images)
return compute_metrics(logits=logits, labels=labels)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment