import torch
import time


def run_model(input_, model):
    """
    average runtime of 10 runs
    """
    model.eval()
    run = 0
    total = 0
    with torch.no_grad():
        while run < 10:
            start = time.time()
            _ = model(input_)
            taken = time.time() - start
            total += taken
            run += 1
        return total / 10