theAIGuysCode / yolov4-custom-functions

A Wide Range of Custom Functions for YOLOv4, YOLOv4-tiny, YOLOv3, and YOLOv3-tiny Implemented in TensorFlow, TFLite, and TensorRT.
MIT License
602 stars 370 forks source link

In need of urgent help please! Tell me how to fix this error #46

Closed Blankspace3 closed 3 years ago

Blankspace3 commented 3 years ago

Traceback (most recent call last): File "save_model.py", line 58, in app.run(main) File "C:\Users\AppData\Local\Programs\Python\Python37\lib\site-packages\absl\app.py", line 303, in run _run_main(main, argv) File "C:\Users\AppData\Local\Programs\Python\Python37\lib\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 "C:\Repos\yolov4-custom-functions\core\utils.py", line 143, in load_weights conv_weights = conv_weights.reshape(conv_shape).transpose([2, 3, 1, 0]) ValueError: cannot reshape array of size 4554552 into shape (1024,512,3,3)