def _run_through_caffe(validation_data, deploy_file, input_weight_file, threshold,
            training_mean_pickle, inference_width, inference_height):
    """
    Runs our validation images through Caffe.
    """

    print "\tInitializing Caffe..."
    net, transformer = _initialize_caffe(deploy_file, input_weight_file, training_mean_pickle,
            inference_width, inference_height)

    print "\tComputing probabilities using Caffe..."
    results = []
    for idx in range(len(validation_data["input_vectors"])):
        im = validation_data["input_vectors"][idx]
        prob = _predict_image(im, net, transformer)
        expected_target = validation_data["expected_targets"][idx]
        predicted_target = 0
        if prob >= threshold:
            predicted_target = 1
        results.append({
            "expected_target": expected_target,
            "predicted_target": predicted_target
        })

    return results
dataset/ETHPy150Open BradNeuberg/cloudless/src/cloudless/train/predict.py/_run_through_caffe/original