7 Replies Latest reply on Nov 8, 2018 3:08 AM by Intel Corporation

    IndexError: list index out of range while using mvNCCompile to turn a tensorflow model to a graph

    shirleyzzz

      while compiling a .meta model using mvNccompile, I met an error:IndexError: list index out of range

      Following is the traceback:

      Traceback (most recent call last):

        File "/usr/local/bin/mvNCCompile", line 118, in <module>

          create_graph(args.network, args.inputnode, args.outputnode, args.outfile, args.nshaves, args.inputsize, args.weights)

        File "/usr/local/bin/mvNCCompile", line 104, in create_graph

          net = parse_tensor(args, myriad_config)

        File "/usr/local/bin/ncsdk/Controllers/TensorFlowParser.py", line 291, in parse_tensor  

          if have_first_input(strip_tensor_id(node.outputs[0].name)):

      IndexError: list index out of range

       

      In order to find out the error, I insert some code in TensorFlowParser.py:

      prev_node = None

              prev_node_label = None

              cnt = 0

              inputfound = False

              for idx, node in enumerate(graph.get_operations()):

                  if debug:

                      print("       ", idx, node.type, node.name)

                      for a in node.inputs:

                          print("           IN:", a.name)

                      for a in node.outputs:

                          print("           OUT:", a.name)

                  if not inputfound:

                     print(node.outputs[0].name)

                      print(node.name)

                      print("get one")

                      if have_first_input(strip_tensor_id(node.outputs[0].name)):

                          inputfound = True

                          if debug:

                              print('Starting to process')

                      continue

       

      Then I got some information before the traceback while compiling again:

      input_producer/Const:0

      input_producer/Const

      get one

      input_producer/Size:0

      input_producer/Size

      get one

      input_producer/Greater/y:0

      input_producer/Greater/y

      get one

      input_producer/Greater:0

      input_producer/Greater

      get one

      input_producer/Assert/Const:0

      input_producer/Assert/Const

      get one

      input_producer/Assert/Assert/data_0:0

      input_producer/Assert/Assert/data_0

      get one

      Traceback (most recent call last):

        File "/usr/local/bin/mvNCCompile", line 118, in <module>

          create_graph(args.network, args.inputnode, args.outputnode, args.outfile, args.nshaves, args.inputsize, args.weights)

        File "/usr/local/bin/mvNCCompile", line 104, in create_graph

          net = parse_tensor(args, myriad_config)

        File "/usr/local/bin/ncsdk/Controllers/TensorFlowParser.py", line 291, in parse_tensor

          print(node.outputs[0].name)

      IndexError: list index out of range

       

      why does this error occur?Can anyone tell me how to pass the compile successfully?