tensorrt_demos: TypeError: buffer is too small for requested array

HI! On converting after training custom data on YOLO_v4 model when I run the script yolo_to_onnx.py python3 yolo_to_onnx.py --model yolov4-608 --category_num 12 I get the error pasted below. Please help how can fix this issue. I make some changes in filters numbers in cfg file for detecting small objects before training but I don’t think so that here it contains some problem, as I am giving my cfg file to fully interpret my model structure. thanks

Parsing DarkNet cfg file...
Building ONNX graph...
Traceback (most recent call last):
  File "yolo_to_onnx.py", line 957, in <module>
    main()
  File "yolo_to_onnx.py", line 940, in main
    verbose=True)
  File "yolo_to_onnx.py", line 451, in build_onnx_graph
    params)
  File "yolo_to_onnx.py", line 323, in load_conv_weights
    conv_params, 'conv', 'weights')
  File "yolo_to_onnx.py", line 351, in _create_param_tensors
    conv_params, param_category, suffix)
  File "yolo_to_onnx.py", line 382, in _load_one_param_type
    buffer=self.weights_file.read(param_size * 4))
TypeError: buffer is too small for requested array

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Comments: 16 (8 by maintainers)

Most upvoted comments

I received the email. I will test it out when I have a chance.