def METHOD_NAME(self):
    print("Run inference for accuracy")
    setup(self.args.data_location, self.args.input_graph)
    graph = tf.Graph()
    with graph.as_default():
        graph_def = tf.compat.v1.GraphDef()
        with open(self.args.input_graph, "rb") as f:
            graph_def.ParseFromString(f.read())
        output_graph = optimize_for_inference(graph_def, [INPUTS], [OUTPUTS],
                            dtypes.float32.as_datatype_enum, False)
        tf.import_graph_def(output_graph, name="")
    input_tensor = graph.get_tensor_by_name('input:0')
    output_tensor = graph.get_tensor_by_name('Identity:0')
    config = tf.compat.v1.ConfigProto()
    config.intra_op_parallelism_threads=self.args.num_intra_threads
    config.inter_op_parallelism_threads=self.args.num_inter_threads
    sess = tf.compat.v1.Session(graph=graph, config=config)
    if (self.args.accuracy_only):
        print("Inference with real data")
        preprocessed_data_dir = "build/preprocessed_data"
        with open(os.path.join(preprocessed_data_dir, "preprocessed_files.pkl"), "rb") as f:
            preprocessed_files = pickle.load(f)
        dictionaries = []
        for preprocessed_file in preprocessed_files:
            with open(os.path.join(preprocessed_data_dir, preprocessed_file + ".pkl"), "rb") as f:
                dct = pickle.load(f)[1]
                dictionaries.append(dct)
        count = len(preprocessed_files)
        predictions = [None] * count
        validation_indices = list(range(0,count))
        print("Found {:d} preprocessed files".format(count))
        loaded_files = {}
        batch_size = self.args.batch_size
        # Get the number of steps based on batch size
        steps = count#math.ceil(count/batch_size)
        for i in range(steps):
            print("Iteration {} ...".format(i))
            test_data_index = validation_indices[i]#validation_indices[i * batch_size:(i + 1) * batch_size]
            file_name = preprocessed_files[test_data_index]
            with open(os.path.join(preprocessed_data_dir, "{:}.pkl".format(file_name)), "rb") as f:
                data = pickle.load(f)[0]
            predictions[i] = sess.METHOD_NAME(output_tensor, feed_dict={input_tensor: data[np.newaxis, ...]})[0].astype(np.float32)
        output_folder = "build/postprocessed_data"
        output_files = preprocessed_files
        # Post Process
        postprocess_output(predictions, dictionaries, validation_indices, output_folder, output_files)
        ground_truths = "build/raw_data/nnUNet_raw_data/Task043_BraTS2019/labelsTr"
        # Run evaluation
        print("Running evaluation...")
        evaluate_regions(output_folder, ground_truths, get_brats_regions())
        # Load evaluation summary
        print("Loading evaluation summary...")
        with open(os.path.join(output_folder, "summary.csv")) as f:
            for line in f:
                words = line.split(",")
                if words[0] == "mean":
                    whole = float(words[1])
                    core = float(words[2])
                    enhancing = float(words[3])
                    mean = (whole + core + enhancing) / 3
                    print("Accuracy: mean = {:.5f}, whole tumor = {:.4f}, tumor core = {:.4f}, enhancing tumor = {:.4f}".format(mean, whole, core, enhancing))
                    break
    print("Done!")