Failure of createworker?

Hi, I noticed that my object detection model is not stable. No error messages. It is simply that the model cannot detect anything sometime. After investigation, I found that the failure cases took much longer time for execution. So, I “solved” this problem by re-creating the worker if the execution takes too long. However, the time threshold should depend on the machine so that my solution is not universal (i.e. it only works on my machine). I wonder whether there is a way to detect abnormal workers?

That’s strange and shouldn’t happen.
Could you share your model as well as a input that makes execution stretch very long?

I am using yolov7-tiny model. Input would be a 640x640 image.
I observed this weird behavior on two mac machines but not windows.
I checked the output of summary() but I did not find useful information. I wonder whether there is other properties or methods I can use?

How are you reading the output?

It is a object detection model with a image as input and bounding boxes as output. Each bounding box is described by {index, x1, y1, x2, y2, class id, score}. Using netron, I can see the input and output as below

Input layer
name: images
tensor: float32[1,3,640,640]

Output layer
name: output
tensor: float32[Concatoutput_dim_0,7]

when your code time-out could it be that the output is 0,7? ie not detecting any boxes?
I also have a hunch it could be due to NMS being too slow?
Does your model has that layer?