Esempio n. 1
0
def main(starting_counter):
    test_args, test_exps, test_fns = [], [], []

    test_fns.append(test_fn_1)
    test_args.append('hello1515.jpg')
    test_exps.append('1515')

    test_fns.append(test_fn_1)
    test_args.append('\hello1515.jpg')
    test_exps.append('1515')

    test_fns.append(test_fn_1)
    test_args.append('\kk\hello1515.jpg')
    test_exps.append('1515')

    test_fns.append(test_fn_2)
    test_args.append(('1515.jpg', 'features_directotry'))
    test_exps.append('features_directotry\\1515.bin')

    test_fns.append(test_fn_2)
    test_args.append(('\hello1515.jpg', 'features_directotry'))
    test_exps.append('features_directotry\\1515.bin')

    test_fns.append(test_fn_2)
    test_args.append(('\kk\hello1515.jpg', 'features_directotry'))
    test_exps.append('features_directotry\\1515.bin')

    tests_basis.create_tests(test_fns, test_args, test_exps)
    return tests_basis.main_tester(
        "Testing some functionality of Dataset feature extraction",
        starting_counter)
Esempio n. 2
0
def main(starting_counter):
    test_args, test_exps, test_fns = [8, 7, 6, 5, 4, 3, 2, 1] * 2, [], []

    test_fns.append(test_fn)
    test_exps.append((8, 2048))

    test_fns.append(test_fn)
    test_exps.append((7, 2048))

    test_fns.append(test_fn)
    test_exps.append((6, 2048))

    test_fns.append(test_fn)
    test_exps.append((5, 2048))

    test_fns.append(test_fn)
    test_exps.append((4, 2048))

    test_fns.append(test_fn)
    test_exps.append((3, 2048))

    test_fns.append(test_fn)
    test_exps.append((2, 2048))

    test_fns.append(test_fn)
    test_exps.append((1, 2048))

    test_fns.append(test_fn)
    test_exps.append((8, 2048))

    test_fns.append(test_fn)
    test_exps.append((7, 2048))

    test_fns.append(test_fn)
    test_exps.append((6, 2048))

    test_fns.append(test_fn)
    test_exps.append((5, 2048))

    test_fns.append(test_fn)
    test_exps.append((4, 2048))

    test_fns.append(test_fn)
    test_exps.append((3, 2048))

    test_fns.append(test_fn)
    test_exps.append((2, 2048))

    test_fns.append(test_fn)
    test_exps.append((1, 2048))

    tests_basis.create_tests(test_fns, test_args, test_exps)
    return tests_basis.main_tester("Testing rebinding resnet200-1k-mxnet", starting_counter)
def main(starting_counter):
    test_args, test_exps, test_fns = [8, 7, 6, 5, 4, 3, 2, 1] * 2, [], []

    test_fns.append(test_special_fn)
    test_exps.append((8, 2048))

    test_fns.append(test_fn)
    test_exps.append((7, 2048))

    test_fns.append(test_fn)
    test_exps.append((6, 2048))

    test_fns.append(test_fn)
    test_exps.append((5, 2048))

    test_fns.append(test_fn)
    test_exps.append((4, 2048))

    test_fns.append(test_fn)
    test_exps.append((3, 2048))

    test_fns.append(test_fn)
    test_exps.append((2, 2048))

    test_fns.append(test_fn)
    test_exps.append((1, 2048))

    test_fns.append(test_fn)
    test_exps.append((8, 2048))

    test_fns.append(test_fn)
    test_exps.append((7, 2048))

    test_fns.append(test_fn)
    test_exps.append((6, 2048))

    test_fns.append(test_fn)
    test_exps.append((5, 2048))

    test_fns.append(test_fn)
    test_exps.append((4, 2048))

    test_fns.append(test_fn)
    test_exps.append((3, 2048))

    test_fns.append(test_fn)
    test_exps.append((2, 2048))

    test_fns.append(test_fn)
    test_exps.append((1, 2048))

    tests_basis.create_tests(test_fns, test_args, test_exps)
    return tests_basis.main_tester("Testing Feature Extraction MAX_BATCH_SIZE graph initialization", starting_counter)
def main(starting_counter):
    test_args, test_exps = [], []

    predictions = tf.constant([[0, 0.1, 0.2, 0.25, 0, 0.1, 0.35],
                               [0, 0.1, 0.2, 0.25, 0, 0.1, 0.35]])
    labels = tf.constant([[0, 0.1, 0, 0.1, 0.1, 0.1, 0.1],
                          [0.2, 0.1, 0, 0, 0.1, 0.1, 0.1]])

    test_args.append((predictions, labels))
    test_exps.append(35)

    tests_basis.create_tests([test_fn] * len(test_args), test_args, test_exps)
    return tests_basis.main_tester("Testing The Top-5 Accuracy",
                                   starting_counter)
def main(starting_counter):
    test_args, test_exps = [], []

    test_args.append([12, 0, True])
    test_exps.append([(12, 2048), (12, 30, 300), (12, 1000), False])

    test_args.append([12, 29994, True])
    test_exps.append([(12, 2048), (12, 30, 300), (12, 1000), False])

    test_args.append([96, 0, True])
    test_exps.append([(96, 2048), (96, 30, 300), (96, 1000), False])

    tests_basis.create_tests([test_fn] * len(test_args), test_args, test_exps)
    return tests_basis.main_tester("Testing image batch loading",
                                   starting_counter)
Esempio n. 6
0
def main(starting_counter):
    test_args, test_exps = [], []

    path = get_path('validation', 'abstract_scenes_v1', 'questions')

    test_args.append([29994, 6, path])
    test_exps.append(6)

    test_args.append([29900, 32, path])
    test_exps.append(32)

    test_args.append([20000, 20, path])
    test_exps.append(20)

    tests_basis.create_tests([test_fn] * len(test_args), test_args, test_exps)

    return tests_basis.main_tester("Testing questions batch loading",
                                   starting_counter)
def main(starting_counter):
    test_args, test_exps = [], []

    path = get_path('validation', 'abstract_scenes_v1', 'annotations')

    question_ids = [275780, 275781, 275782, 255060, 255061, 255062]

    test_args.append([question_ids, path])
    test_exps.append(len(question_ids))

    test_args.append([question_ids[:1], path])
    test_exps.append(1)

    test_args.append([question_ids[:5], path])
    test_exps.append(5)

    tests_basis.create_tests([test_fn] * len(test_args), test_args, test_exps)
    return tests_basis.main_tester("Testing annotations batch loading",
                                   starting_counter)
Esempio n. 8
0
def main(starting_counter):
    test_args = []

    test_args.append("wow")

    # Should take less time
    test_args.append("ok")

    # Does it cach data?
    test_args.append("ok")

    test_args.append("hello")

    tests_basis.create_tests([test_fn] * len(test_args), test_args, [(300, )] * len(test_args))
    ret = tests_basis.main_tester("Testing The Word2Vector Conversion", starting_counter)

    _unload_model()

    return ret
def main(starting_counter):
    test_args, test_exps, test_fns = [], [], []

    test_args = [None] * 4

    test_fns.append(test_fn_1)
    test_exps.append((1, 4096))

    test_fns.append(test_fn_2)
    test_exps.append((1, 4096))

    test_fns.append(test_fn_3)
    test_exps.append((4, 4096))

    test_fns.append(test_fn_4)
    test_exps.append((4, 4096))

    tests_basis.create_tests(test_fns, test_args, test_exps)
    return tests_basis.main_tester(
        "Testing the feature extraction from the VGG19-1k-mxnet",
        starting_counter)
def main(starting_counter):
    test_args, test_exps = [], []

    path = get_path('validation', 'abstract_scenes_v1', 'images')

    image_ids = [
        20000, 20001, 20002, 20003, 20004, 20005, 20006, 20007, 20008, 20009
    ]

    test_args.append([image_ids, path])
    test_exps.append(len(image_ids))

    test_args.append([image_ids[:1], path])
    test_exps.append(1)

    test_args.append([image_ids[:5], path])
    test_exps.append(5)

    tests_basis.create_tests([test_fn] * len(test_args), test_args, test_exps)
    return tests_basis.main_tester("Testing image batch loading",
                                   starting_counter)
Esempio n. 11
0
def main(starting_counter):
    test_args, test_exps, test_fns = [], [], []

    test_args = [None] * 5

    test_fns.append(test_fn_1)
    test_exps.append((1, 2048))

    test_fns.append(test_fn_2)
    test_exps.append((1, 2048))

    test_fns.append(test_fn_3)
    test_exps.append((4, 2048))

    test_fns.append(test_fn_4)
    test_exps.append((4, 2048))

    test_fns.append(test_fn_5)
    test_exps.append((5, 2048))

    tests_basis.create_tests(test_fns, test_args, test_exps)
    return tests_basis.main_tester("Testing the general feature extraction", starting_counter)
Esempio n. 12
0
def main(starting_counter):
    test_args, test_exps = [], []

    test_args.append("hello world !")
    test_exps.append(["hello", "world"])

    test_args.append("haven't you seen?")
    test_exps.append(["have", "not", "you", "see"])

    test_args.append("ok... I saw him !!")
    test_exps.append(["ok", "i", "saw", "him"])

    test_args.append("it's 5.30 o'clock, come fast")
    test_exps.append(["it", "be", "5.30", "o'clock", "come", "fast"])

    test_args.append("he ran from ahmed.")
    test_exps.append(["he", "run", "from", "ahmed"])

    test_args.append("does it contains sugar?")
    test_exps.append(["do", "it", "contain", "sugar"])

    test_args.append("play football..")
    test_exps.append(["play", "football"])

    test_args.append("OK")
    test_exps.append(["ok"])

    test_args.append("you're a good looking person.")
    test_exps.append(["you", "be", "a", "good", "look", "person"])

    test_args.append("he'd dragged me away")
    test_exps.append(["he", "have", "drag", "me", "away"])

    test_args.append("he'd drag me away")
    test_exps.append(["he", "would", "drag", "me", "away"])

    tests_basis.create_tests([test_fn] * len(test_args), test_args, test_exps)
    return tests_basis.main_tester("Testing The sentence preprocessing",
                                   starting_counter)
Esempio n. 13
0
def main(starting_counter):
    test_args, test_exps, test_fns = [], [], []

    test_args = [None] * 3

    test_fns.append(test_fn_1)
    test_exps.append((2, 2048))

    test_fns.append(test_fn_2)
    test_exps.append((2, 2048))

    test_fns.append(test_fn_3)
    test_exps.append((4, 2048))

    tests_basis.create_tests(test_fns, test_args, test_exps)
    ret = tests_basis.main_tester(
        "Testing the feature extraction from the resnet152-1k-tf",
        starting_counter)

    _close_session()

    return ret