Skip to content

Custom output tensor #6

@didriksg

Description

@didriksg

Hey!

I'm trying to convert a YOLOv3 network with a custom output tensor to ONNX by using your code. The output tensor consists 8+1 instead of 4+1 parametres.

I'm having some problems doing this directly, your system understandably does not support this. Could you point me in the right direction of the changes needed to support this?

Trying to use the system directly, I get the following error:

  File "/home/didrik/git/PyTorch-Onnx-Tensorrt/create_onnx.py", line 772, in <module>
    main()
  File "/home/didrik/git/PyTorch-Onnx-Tensorrt/create_onnx.py", line 760, in main
    verbose=True)
  File "/home/didrik/git/PyTorch-Onnx-Tensorrt/create_onnx.py", line 392, in build_onnx_graph
    params)
  File "/home/didrik/git/PyTorch-Onnx-Tensorrt/create_onnx.py", line 269, in load_conv_weights
    conv_params, 'conv', 'weights')
  File "/home/didrik/git/PyTorch-Onnx-Tensorrt/create_onnx.py", line 298, in _create_param_tensors
    conv_params, param_category, suffix)
  File "/home/didrik/git/PyTorch-Onnx-Tensorrt/create_onnx.py", line 328, in _load_one_param_type
    buffer=self.weights_file.read(param_size * 4))
TypeError: buffer is too small for requested array```

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