Last active
December 18, 2023 13:59
-
-
Save mwitiderrick/75e4f5152e4a262d989ac52128b3b365 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def evaluate_model(state, batch): | |
"""Evaluate on the validation set.""" | |
test_imgs, test_lbls = batch | |
metrics = eval_step(state, test_imgs, test_lbls) | |
metrics = jax.device_get(metrics) | |
metrics = jax.tree_map(lambda x: x.item(), metrics) | |
return metrics |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment