コード例 #1
0
def test_liveness6(vww_graph):
    tfi = TfliteImporter()
    G = tfi.create_graph(vww_graph, {})
    assert G
    steps = add_dimensions(G)
    liveness = calculate_liveness(G, steps)
    assert len(liveness) == 121  # no record for 1 output
コード例 #2
0
 def add_dimensions(self, quiet=False):
     if not quiet:
         LOG.info("update graph dimensions")
     self.graph_state.steps = add_dimensions(self)
     if not quiet:
         LOG.info("calculate liveness")
     self.graph_state.liveness = calculate_liveness(self,
                                                    self.graph_state.steps)
コード例 #3
0
def test_liveness4(cifar10_graph):
    G = create_graph(cifar10_graph, {})
    assert G
    steps = add_dimensions(G)
    liveness = calculate_liveness(G, steps)
    assert len(liveness) == 15 # no record for 1 output
コード例 #4
0
def test_liveness3(ssd_graph):
    G = create_graph(ssd_graph, {})
    assert G
    steps = add_dimensions(G)
    liveness = calculate_liveness(G, steps)
    assert len(liveness) == 39 # no record for 1 output
コード例 #5
0
def test_liveness2(ir_graph):
    G = create_graph(ir_graph, {})
    steps = add_dimensions(G)
    liveness = calculate_liveness(G, steps)
    assert len(liveness) == 23 # no record for 8 outputs
コード例 #6
0
def test_liveness1(mnist_graph):
    G = create_graph(mnist_graph, {})
    steps = add_dimensions(G)
    liveness = calculate_liveness(G, steps)
    assert len(liveness) == 9 # no record for 1 output
コード例 #7
0
def test_add_dimension4(cifar10_graph):
    G = create_graph(cifar10_graph, {})
    steps = add_dimensions(G)
    verify_steps(steps, 16)
コード例 #8
0
def test_add_dimension3(ssd_graph):
    G = create_graph(ssd_graph, {})
    steps = add_dimensions(G)
    verify_steps(steps, 40)
コード例 #9
0
def test_add_dimension4(cifar10_graph):
    tfi = TfliteImporter()
    G = tfi.create_graph(cifar10_graph, {})
    steps = add_dimensions(G)
    verify_steps(steps, 16)
コード例 #10
0
def test_add_dimension1(mnist_graph):
    G = create_graph(mnist_graph, {})
    steps = add_dimensions(G)
    verify_steps(steps, 10)
コード例 #11
0
def test_liveness2(ir_graph):
    tfi = TfliteImporter()
    G = tfi.create_graph(ir_graph, {})
    steps = add_dimensions(G)
    liveness = calculate_liveness(G, steps)
    assert len(liveness) == 23  # no record for 8 outputs
コード例 #12
0
def test_add_dimension8(mn3_graph):
    tfi = TfliteImporter()
    G = tfi.create_graph(mn3_graph, {})
    assert len(list(G.dfs())) == 160
    steps = add_dimensions(G)
    verify_steps(steps, 160)
コード例 #13
0
def test_add_dimension7(qvww_graph):
    tfi = TfliteImporter()
    G = tfi.create_graph(qvww_graph, {})
    steps = add_dimensions(G)
    verify_steps(steps, 159)
コード例 #14
0
def test_add_dimension5(kws_graph):
    tfi = TfliteImporter()
    G = tfi.create_graph(kws_graph, {})
    steps = add_dimensions(G)
    verify_steps(steps, 9)
コード例 #15
0
 def add_dimensions(self):
     LOG.info("update graph dimensions")
     self.graph_state.steps = add_dimensions(self)
     LOG.info("calculate liveness")
     self.graph_state.liveness = calculate_liveness(self,
                                                    self.graph_state.steps)
コード例 #16
0
def test_add_dimension2(ir_graph):
    G = create_graph(ir_graph, {})
    steps = add_dimensions(G)
    verify_steps(steps, 31)
コード例 #17
0
def test_load12():
    tfi = TfliteImporter()
    G = tfi.create_graph("tests/graph/imu.tflite", {'load_tensors': True})
    steps = add_dimensions(G)
    verify_steps(steps, 8)
    assert G