You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
!python save_model.py --weights /content/tensorflow-yolov4-tflite/data/yolov4-custom_last.weights --output ./checkpoints/custom-416 --input_size 416 --model yolov4 --framework tflite
2022-09-17 18:04:49.809104: I tensorflow/stream_executor/platform/default/dso_loader.cc:48] Successfully opened dynamic library libcudart.so.10.1
2022-09-17 18:04:51.493961: I tensorflow/stream_executor/platform/default/dso_loader.cc:48] Successfully opened dynamic library libcuda.so.1
2022-09-17 18:04:51.503223: E tensorflow/stream_executor/cuda/cuda_driver.cc:314] failed call to cuInit: CUDA_ERROR_NO_DEVICE: no CUDA-capable device is detected
2022-09-17 18:04:51.503344: I tensorflow/stream_executor/cuda/cuda_diagnostics.cc:156] kernel driver does not appear to be running on this host (79cfa2660112): /proc/driver/nvidia/version does not exist
2022-09-17 18:04:51.504271: I tensorflow/core/platform/cpu_feature_guard.cc:142] This TensorFlow binary is optimized with oneAPI Deep Neural Network Library (oneDNN)to use the following CPU instructions in performance-critical operations: AVX2 FMA
To enable them in other operations, rebuild TensorFlow with the appropriate compiler flags.
2022-09-17 18:04:51.512390: I tensorflow/core/platform/profile_utils/cpu_utils.cc:104] CPU Frequency: 2199995000 Hz
2022-09-17 18:04:51.512654: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x20e8f40 initialized for platform Host (this does not guarantee that XLA will be used). Devices:
2022-09-17 18:04:51.512699: 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 "/usr/local/lib/python3.7/dist-packages/absl/app.py", line 308, in run
_run_main(main, args)
File "/usr/local/lib/python3.7/dist-packages/absl/app.py", line 254, 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 "/content/tensorflow-yolov4-tflite/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 92951 into shape (256,128,3,3)
I made the following efforts to correct this error.
I use these code to replace that one,and it worked.
However the weight didn't work as I thought. There is no boundingbox in the ouput of image.
I don't know how is going on.
Hope to help you.
!python save_model.py --weights /content/tensorflow-yolov4-tflite/data/yolov4-custom_last.weights --output ./checkpoints/custom-416 --input_size 416 --model yolov4 --framework tflite
2022-09-17 18:04:49.809104: I tensorflow/stream_executor/platform/default/dso_loader.cc:48] Successfully opened dynamic library libcudart.so.10.1
2022-09-17 18:04:51.493961: I tensorflow/stream_executor/platform/default/dso_loader.cc:48] Successfully opened dynamic library libcuda.so.1
2022-09-17 18:04:51.503223: E tensorflow/stream_executor/cuda/cuda_driver.cc:314] failed call to cuInit: CUDA_ERROR_NO_DEVICE: no CUDA-capable device is detected
2022-09-17 18:04:51.503344: I tensorflow/stream_executor/cuda/cuda_diagnostics.cc:156] kernel driver does not appear to be running on this host (79cfa2660112): /proc/driver/nvidia/version does not exist
2022-09-17 18:04:51.504271: I tensorflow/core/platform/cpu_feature_guard.cc:142] This TensorFlow binary is optimized with oneAPI Deep Neural Network Library (oneDNN)to use the following CPU instructions in performance-critical operations: AVX2 FMA
To enable them in other operations, rebuild TensorFlow with the appropriate compiler flags.
2022-09-17 18:04:51.512390: I tensorflow/core/platform/profile_utils/cpu_utils.cc:104] CPU Frequency: 2199995000 Hz
2022-09-17 18:04:51.512654: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x20e8f40 initialized for platform Host (this does not guarantee that XLA will be used). Devices:
2022-09-17 18:04:51.512699: 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 "/usr/local/lib/python3.7/dist-packages/absl/app.py", line 308, in run
_run_main(main, args)
File "/usr/local/lib/python3.7/dist-packages/absl/app.py", line 254, 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 "/content/tensorflow-yolov4-tflite/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 92951 into shape (256,128,3,3)
I made the following efforts to correct this error.
#396 (comment)
#396 (comment)
However, the error has not been corrected.
I also checked that there is no empty line at the bottom of the file.
The text was updated successfully, but these errors were encountered: