  def eval_step(model, batch):
    logits = model(batch['image'])
    return compute_metrics(logits, batch['label'])
-@@ -140,16 +145,23 @@ def train_epoch(optimizer, train_ds, batch_size, epoch, rng):
+@@ -113,16 +118,23 @@ def train_epoch(optimizer, train_ds, batch_size, epoch, rng):
    batch_metrics = []
    for perm in perms:
      batch = {k: v[perm] for k, v in train_ds.items()}

                epoch_metrics_np['loss'], epoch_metrics_np['accuracy'] * 100)
 
   return optimizer, epoch_metrics_np
@@ -158,7 +170,7 @@ def train_epoch(optimizer, train_ds, batch_size, epoch, rng):
 def eval_model(model, test_ds):
   metrics = eval_step(model, test_ds)
   metrics = jax.device_get(metrics)

 def create_optimizer(model, learning_rate, beta):
   optimizer_def = optim.Momentum(learning_rate=learning_rate, beta=beta)
   optimizer = optimizer_def.create(model)
@@ -82,7 +87,7 @@ def compute_metrics(logits, labels):
   return metrics
 
 
