Skip to content

Custom model save_model issue #94

@AndrewMarines

Description

@AndrewMarines

Hello, I downloaded an already done weights file for my purpose.
python save_model.py --weights path_to_custom_weights --output ./checkpoints/custom-416 --input_size 416 --model yolov4

but he's giving me this issue:
2022-07-26 10:55:32.916596: W tensorflow/stream_executor/platform/default/dso_loader.cc:64] Could not load dynamic library 'cudart64_110.dll'; dlerror: cudart64_110.dll not found 2022-07-26 10:55:32.916796: I tensorflow/stream_executor/cuda/cudart_stub.cc:29] Ignore above cudart dlerror if you do not have a GPU set up on your machine. 2022-07-26 10:55:36.224921: W tensorflow/stream_executor/platform/default/dso_loader.cc:64] Could not load dynamic library 'nvcuda.dll'; dlerror: nvcuda.dll not found 2022-07-26 10:55:36.225092: W tensorflow/stream_executor/cuda/cuda_driver.cc:269] failed call to cuInit: UNKNOWN ERROR (303) 2022-07-26 10:55:36.229386: I tensorflow/stream_executor/cuda/cuda_diagnostics.cc:169] retrieving CUDA diagnostic information for host: AE 2022-07-26 10:55:36.229590: I tensorflow/stream_executor/cuda/cuda_diagnostics.cc:176] hostname: AE 2022-07-26 10:55:36.230180: I tensorflow/core/platform/cpu_feature_guard.cc:193] This TensorFlow binary is optimized with oneAPI Deep Neural Network Library (oneDNN) to use the following CPU instructions in performance-critical operations: AVX AVX2 To enable them in other operations, rebuild TensorFlow with the appropriate compiler flags. Traceback (most recent call last): File "C:\Users\andre\Desktop\yolov4-custom-functions-master\save_model.py", line 58, in <module> app.run(main) File "C:\Users\andre\AppData\Local\Programs\Python\Python310\lib\site-packages\absl\app.py", line 308, in run _run_main(main, args) File "C:\Users\andre\AppData\Local\Programs\Python\Python310\lib\site-packages\absl\app.py", line 254, in _run_main sys.exit(main(argv)) File "C:\Users\andre\Desktop\yolov4-custom-functions-master\save_model.py", line 54, in main save_tf() File "C:\Users\andre\Desktop\yolov4-custom-functions-master\save_model.py", line 49, in save_tf utils.load_weights(model, FLAGS.weights, FLAGS.model, FLAGS.tiny) File "C:\Users\andre\Desktop\yolov4-custom-functions-master\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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions