Open Akash3194 opened 3 years ago
Hi. Any solution to this issue? I got the same error
Even I m facing the same error. Please let me know if you come across with an answer
I've facing same problem, but already solved by change the value of __C.YOLO.CLASSES
with custom classes path in core/config.py
@sutejoramadhan Hello. I have changed the config.py file with appropriate classes path and anchors but still doesn't work after successful conversion into tflite format. Any suggestions?
I fix this issue by checking file obj.names. There was empty line in the bottom of file. It was enterpreted as +1 class. Thats it.
I am getting error like below while using my own yolov4 weights model, i have already replace .names file with my own in core config file. In my model i have just 1 class. The error i am getting is below.
A service 0x3cf2520 initialized for platform Host (this does not guarantee that XLA will be used). Devices: 2021-06-10 15:18:21.048305: I tensorflow/compiler/xla/service/service.cc:176] StreamExecutor device (0): Host, Default Version Traceback (most recent call last): File "save_model.py", line 58, in app.run(main) File "/home/aakash_tyagi/PycharmProjects/tensorflow-yolov4-tflite/venv/lib/python3.6/site-packages/absl/app.py", line 303, in run _run_main(main, args) File "/home/aakash_tyagi/PycharmProjects/tensorflow-yolov4-tflite/venv/lib/python3.6/site-packages/absl/app.py", line 251, in _run_main sys.exit(main(argv)) File "save_model.py", line 54, in main save_tf() File "save_model.py", line 49, in save_tf utils.load_weights(model, FLAGS.weights, FLAGS.model, FLAGS.tiny) File "/home/aakash_tyagi/PycharmProjects/tensorflow-yolov4-tflite/core/utils.py", line 63, in load_weights conv_weights = conv_weights.reshape(conv_shape).transpose([2, 3, 1, 0]) ValueError: cannot reshape array of size 4457630 into shape (1024,512,3,3)