Fix for ValueError (expected type INT8) (#13341)
This commit is contained in:
parent
5df2d167a9
commit
cf081c4db7
1 changed files with 2 additions and 1 deletions
|
|
@ -258,7 +258,8 @@ class Yolov8TFLite:
|
|||
img_data = img_data.transpose((0, 2, 3, 1))
|
||||
|
||||
scale, zero_point = input_details[0]["quantization"]
|
||||
interpreter.set_tensor(input_details[0]["index"], img_data)
|
||||
img_data_int8 = (img_data / scale + zero_point).astype(np.int8)
|
||||
interpreter.set_tensor(input_details[0]["index"], img_data_int8)
|
||||
|
||||
# Run inference
|
||||
interpreter.invoke()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue