Пример #1
0
def test_long_transform():
    graph = CnnGenerator(10, (32, 32, 3)).generate()
    history = [('to_wider_model', 1, 256), ('to_conv_deeper_model', 1, 3),
               ('to_concat_skip_model', 5, 9)]
    for args in history:
        getattr(graph, args[0])(*list(args[1:]))
        graph.produce_model()
    assert legal_graph(graph)
Пример #2
0
def test_long_transform():
    graph = CnnGenerator(10, (32, 32, 3)).generate()
    history = [('to_wider_model', 1, 256), ('to_conv_deeper_model', 1, 3),
               ('to_concat_skip_model', 5, 9)]
    for args in history:
        getattr(graph, args[0])(*list(args[1:]))
        graph.produce_model()
    assert legal_graph(graph)
Пример #3
0
def test_wider_dense():
    graph = CnnGenerator(10, (32, 32, 3)).generate()
    graph.produce_model().set_weight_to_graph()
    history = [('to_wider_model', 14, 64)]
    for args in history:
        getattr(graph, args[0])(*list(args[1:]))
        graph.produce_model()
    assert legal_graph(graph)
Пример #4
0
def test_wider_dense():
    graph = CnnGenerator(10, (32, 32, 3)).generate()
    graph.produce_model().set_weight_to_graph()
    history = [('to_wider_model', 14, 64)]
    for args in history:
        getattr(graph, args[0])(*list(args[1:]))
        graph.produce_model()
    assert legal_graph(graph)