Beispiel #1
0
    def test_infer1(self):
        graph = build_graph(nodes_attributes, edges1, inputs1)
        lookuptableinsert_node = Node(graph, 'lookuptableinsert_node')
        LookupTableInsert.infer(lookuptableinsert_node)

        # prepare reference results
        ref_output_shape = int64_array([])

        # get the result
        res_output_shape = graph.node['output']['shape']

        self.assertTrue(np.array_equal(ref_output_shape, res_output_shape),
                        'shapes do not match expected: {} and given: {}'.format(ref_output_shape, res_output_shape))
Beispiel #2
0
 def extract(cls, node):
     LookupTableInsert.update_node_stat(node, {})
     return cls.enabled