Open JINYU-FAN opened 2 years ago
can you please try input_ndims = tuple(inputTensors[1].dims) print('input:',input_ndims)
Hi, thank you for replying! I have changed the code to:
print('dpu_subgraph_1:')
print(inputTensors, outputTensors)
input_ndims = tuple(inputTensors[1].dims)
output_ndims = tuple(outputTensors[1].dims)
print('input:',input_ndims)
print('output:',output_ndims)
runner = vart.Runner.create_runner(dpu_subgraphs[1], 'run')
inputTensors = runner.get_input_tensors()
outputTensors = runner.get_output_tensors()
print('dpu_subgraph_2:')
print(inputTensors, outputTensors)
input_ndims = tuple(inputTensors[1].dims)
output_ndims = tuple(outputTensors[1].dims)
print('input:',input_ndims)
print('output:',output_ndims)
The result is:
The same problem also exists with dpu_subgraph2: I printed out the inputTensors: [<xir.Tensor named 'Net__Net_input_1_reshaped'>] There is only one element in the list, which means that the inputTensors[1] would raise an error.
can you please save your xmodel to some place for downloading?
can you please save your xmodel to some place for downloading?
multi.zip Hi, I have uploaded the complete code above.
Not quite sure if this will fix your problem, but I think you can tell the compiler (vai_c) that the last to layers should be outputs: --options '{"output_ops": "nameOut1,nameOut2"}' (Don't put a space after the "," when listing the output names)
See also: https://docs.xilinx.com/r/2.5-English/ug1414-vitis-ai/VAI_C-Usage
Hi @JINYU-FAN , any update about this issue?
I am trying to build models with multiple inputs and multiple outputs. A small example is created as below:
The model is calibrated with:
After the calibration and test, I visualised the model with Netron:
However, when I try to create the runner with the model with the following code:
The result gives:
dpu_subgraphs: [<xir.Subgraph named 'subgraph_NetNet_76_new'>, <xir.Subgraph named 'subgraph_NetNet_72_new'>] Xmodel compiled with batchSize: 1 Xmodel compiled with batchSize: 1 dpu_subgraph_1: [<xir.Tensor named 'NetNet_input_1_reshaped'>] [<xir.Tensor named 'NetNet_76_fix_new'>] input: (4, 4, 6, 50) output: (4, 1, 1, 50) Xmodel compiled with batchSize: 1 Xmodel compiled with batchSize: 1 dpu_subgraph_2: [<xir.Tensor named 'Net__Net_input_1_reshaped'>] [<xir.Tensor named 'Net__Net_72_fix_new'>] input: (4, 4, 6, 50) output: (4, 1, 1, 40)
Strangely, there is only the input buffer for x (40,30), and I could not figure out how to get access to the input y (33,20).