tensorflow-yolov4-tflite icon indicating copy to clipboard operation
tensorflow-yolov4-tflite copied to clipboard

ValueError: Input 0 of node StatefulPartitionedCall/model/batch_normalization/AssignNewValue was passed float from Func/StatefulPartitionedCall/input/_4:0 incompatible with expected resource.

Open matthieu-as opened this issue 4 years ago • 6 comments

System information

  • windows 10
  • python 3.6
  • tensorflow 2.3.0

When I try to convert my own trained yolov3-tiny model to tflite with the following command: python convert_tflite.py --weights checkpoints/yolov3-tiny-416 --output yolov3.tflite --quantize_mode int8 --dataset coco_dataset/coco/val207.txt , I always hit the fottlowing error: ValueError: Input 0 of node StatefulPartitionedCall/model/batch_normalization/AssignNewValue was passed float from Func/StatefulPartitionedCall/input/_4:0 incompatible with expected resource.

Did anyone run into the same error or knows how to solve it?

matthieu-as avatar Apr 23 '21 20:04 matthieu-as

I am also getting the same error. Were you able to solve it?

pramodhrachuri avatar May 12 '21 02:05 pramodhrachuri

Any luck with this issue? I am facing the same problem.

KulkarniKaustubh avatar Jun 02 '21 08:06 KulkarniKaustubh

I meet the same problem. Did any one solve it?

piggychu0w0 avatar Jun 07 '21 08:06 piggychu0w0

我也遇到这个问题,后面用tf2.3版本的重新运行了save_model.py再使用新生成的文件运行convert_tflite.py就没报错了。

WZZDK avatar Jun 08 '21 08:06 WZZDK

In case it helps, I also got this exact error using Linux with a Tensorflow container (2.3.0rc0). Both with convert_rt.py and convert_tflite.py However, I executed save_model.py on another machine and tried to convert this tensorflow model. Instead, I executed save_model.py in the container and it worked.

JonathanSamelson avatar Jun 18 '21 12:06 JonathanSamelson

You should try to save_model tf again then convert to tflite. It worked for me. I hope it help you all.

ddinhtuann avatar Dec 29 '21 02:12 ddinhtuann