8000 interpreter.invoke() call is stuck when running inference with int8 static quantized tflite model · Issue #157 · google-coral/pycoral · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
This repository was archived by the owner on Jul 3, 2025. It is now read-only.
This repository was archived by the owner on Jul 3, 2025. It is now read-only.
interpreter.invoke() call is stuck when running inference with int8 static quantized tflite model #157
Open
@VatsalBambhania

Description

@VatsalBambhania

Description

I'm trying to run an inference on uint8 static quantized tflite model. The usb accelerator is detected properly, I can also allocate tensors and also set tensor with relevant input. However, when I run the cell with code interpreter.invoke() (I'm using jupyter notebooks in VS Code), it keeps on running indefinitely without either finishing the execution or giving any error.

Model
I'm using Resnet18 model modified for segmentation (decoder part written using standard modules). The model is originally a pytorch model.

Model Conversion
To convert the model to tflite, I'm following the below mentioned process:

PyTorch -> ONNX -> saved_model (onnx2tf) -> Quantization + tflite (tf.lite.TFLiteConverter) -> edgetpu_compiler

PyTorch to ONNX,

Image

ONNX to saved_model,

$ onnx2tf -i torch_resnet18_128.onnx

saved_model to tflite (uint8 Quantized)

Image

tflite to edgetpu

edgetpu_compiler resnet18_128_quantized_uint8.tflite

Inference

Image

Also here's the netron graph of final edgetpu compiled model

Image

Actual Behaviour

When I execute the cells to run the inference code, the execution is stuck at interpreter.invoke call and continues to execute until I kill that process manually.

WELP
PLEASE LET ME KNOW WHAT AM I DOING WRONG

Click to expand!

Issue Type

Bug

Operating System

Windows 10

Coral Device

USB Accelerator

Other Devices

No response

Programming Language

Python 3.8

Relevant Log Output

```</details>

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0