guichristmann / edge-tpu-tiny-yolo

Run Tiny YOLO-v3 on Google's Edge TPU USB Accelerator.
MIT License
102 stars 31 forks source link

RuntimeError: Max and min for dynamic tensors should be recorded during calibration #5

Open ghost opened 4 years ago

ghost commented 4 years ago

Hi, When I convert .h5 model to .tflite, happened to RuntimeError: Max and min for dynamic tensors should be recorded during calibration. I used tf-nightly version: 2.3.0, .h5 is convert from coco-tiny-v3-relu.weights, coco-tiny-v3-relu.cfg with your keras-yolov3 fork. Not modified anything.

ghost commented 4 years ago

I solved this by add converter.experimental_new_converter=False to keras_to_tflite_quant.py. But when I compile output-filename.tflite with edgetpu_compiler (version: 2.1.302470888), comes out error:

ERROR: Didn't find op for builtin opcode 'RESIZE_NEAREST_NEIGHBOR' version '3' 
ERROR: Registration failed.`
Air000 commented 4 years ago

Found the solution finally, downgrade tf-nightly version to 2.2.0: pip install tf-nightly-cpu==2.2.0.dev20200301

Sayyam-Jain commented 4 years ago

Solved installing Tensorflow 2.1.0 link