def eval_forward(model, images, labels): logits = model(images, training=False) top1_count, top5_count = correct_topk(logits, labels, topk=(1, 5)) return top1_count, top5_count
def eval_forward(model, variables, images, labels): logits = model.apply(variables, images, mutable=False, training=False) top1_count, top5_count = correct_topk(logits, labels, topk=(1, 5)) return top1_count, top5_count