onnx-pytorch icon indicating copy to clipboard operation
onnx-pytorch copied to clipboard

When I convert the model, I can't get the Conv weight ? I am confused about it.

Open GuardSkill opened this issue 3 years ago • 4 comments

image

GuardSkill avatar Sep 14 '21 04:09 GuardSkill

The initializers dict don't have the weight key

GuardSkill avatar Sep 14 '21 04:09 GuardSkill

this is my net 图片

Nueractive avatar Sep 14 '21 04:09 Nueractive

@GuardSkill A hypothesis is that model's weight is not stored in initializer field. You can print model.graph.initializer to confirm it.

fumihwh avatar Sep 16 '21 05:09 fumihwh

Thanks for your reply, I have solved this problem. This issue is raised by the Conv's weight inferred by the conv operation in the forward process, I modify the op_code_generator/Conv.py and op_code_generator/ConvTranspose.py for the support the 'F.conv2d()". Your contribution is great,

GuardSkill avatar Sep 16 '21 05:09 GuardSkill