happyme531 commited on
Commit
eda4c05
·
verified ·
1 Parent(s): 1ec6d57

Fix RKNN data layout

Browse files
Files changed (1) hide show
  1. onnx/rknnrun.py +1 -1
onnx/rknnrun.py CHANGED
@@ -46,7 +46,7 @@ for k, v in inputs.items():
46
 
47
  # 4. run vision encoder using RKNN
48
  start_time = time.time()
49
- image_features = rknn_vision_encoder.inference(inputs=[inputs["pixel_values"]])[0]
50
  end_time = time.time()
51
  vision_encoder_time = (end_time - start_time) * 1000
52
  total_time += vision_encoder_time
 
46
 
47
  # 4. run vision encoder using RKNN
48
  start_time = time.time()
49
+ image_features = rknn_vision_encoder.inference(inputs=[inputs["pixel_values"]], data_format='nchw')[0]
50
  end_time = time.time()
51
  vision_encoder_time = (end_time - start_time) * 1000
52
  total_time += vision_encoder_time