错误记录:FutureWarning: Using a non-tuple sequence for multidimensional indexing is deprecate

Copyright: original works, welcome to forward! Forwarding attached link https://blog.csdn.net/qq_26369907/article/details/90519549

Second-generation computing the rod (Neural Compute Stick 2), the 2018 Intel introduced a tool for depth calculation by using the Intel ®OpenVINO ™ kit can run faster model can be applied to study in depth.

I used to write Pytorch framework model, model name: model.pt , pt files need to be converted to calculate the IR stick identification document, the basic idea is pt- "onnx-" IR. Then onnx- "IR this point there has been a problem in this record:

1 being given: during the multidimensional index, using a non-tuples are discarded. Meaning that when the multidimensional index operations to take into account the relationship between data structures.
/opt/intel/computer_vision_sdk_2018.5.455/deployment_tools/model_optimizer/mo/ops/slice.py:111: FutureWarning : A non-tuple the Using Multidimensional Indexing IS Sequence for deprecated; use arr[tuple(seq)]INSTEAD of arr[seq]. Will the In The Future the this AS AN BE Interpreted index Array, arr[np.array(seq)], Which Will Result in either A or aN error Different Result.
value = value [slice_idx]
Here Insert Picture Description
being given 2 being given construct an image optimizer, data flow control error. In fact, this is an error with the above said onnx model data structure problem.
File "/opt/intel/computer_vision_sdk_2018.5.455/deployment_tools/model_optimizer/mo/graph/graph.py", Line 329, in in_node
  return self.in_nodes (= the control_flow the control_flow) [Key]
a KeyError:. 1
Here Insert Picture Description

According to the above two error, recheck pt- "onnx this step.
I found the following warning appears:
TracerWarning: Converting Tensor A to A Python Might the cause is at The index to the trace We CAN BE in here Incorrect not the Record at The Python values of the Data Flow, the this value by Will BE SO AS A Constant in Treated at The Future This means that.. might not the generalize to the trace at the OTHER the Inputs!
x1 = the X-[:,: (x.shape [1] // 2),:,:]
to convert tensor Python index may cause incorrect tracking. We can not record the data stream Python value, so the value of the future will be treated as a constant process. This means that the track may not apply to other input! Mean indexing operation causes the internal tensor data flow and structures have been destroyed, only as an input value, can not be brought to use. ! ! ! The problem is that this line of code

x1 = x[:, :(x.shape[1]//2), :, :]  # 输出x的一半

x is a tensor, the operation of the python tensor is a method, rather than carrying the torch tool, thus destroying the structure tensor, and tensor for numpy first consider its own processing tool, and then consider other.
Improve:

x1 = torch.chunk(x, 2, 1)[0]

problem solved.

Follow-up will record the calculation bar built in Ubuntu16.04 and raspberry 3B + environment article, as well as how to use the model to calculate run rod.

Guess you like

Origin blog.csdn.net/qq_26369907/article/details/90519549