happyme531
commited on
Fix RKNN data layout
Browse files- 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
|