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
When creating a converter by following the hf_demo example, there is a mismatch in behavior depending on model size. This causes: RuntimeError: Input type (torch.FloatTensor) and weight type (torch.cuda.FloatTensor) should be the same or input should be a MKLDNN tensor and weight is a dense tensor.
This happens when DEFAULT_MODEL is v9-m or v9-s, and does not happen when using either v9-c or v7. Tracing the problem to the yolo code yielded no results, so i am asking here in case this is an oversight on my part.
To Reproduce
This is the relevant code. No other part of my code is interfacing with the yolo module. I believe copying and pasting this will yield the exact same result.
On further investigation, I have traced the issue to the dummy test for auto-anchor size, since the faulty model configurations do not provide the stride parameter.
Thank you for reporting this issue and providing detailed environment information.
The bug has been fixed in commit 5f0e785. The issue was caused by the way we adapted the converter. It has now been resolved by moving the model to the correct device after building the converter.
Describe the bug
When creating a converter by following the hf_demo example, there is a mismatch in behavior depending on model size. This causes:
RuntimeError: Input type (torch.FloatTensor) and weight type (torch.cuda.FloatTensor) should be the same or input should be a MKLDNN tensor and weight is a dense tensor.
This happens when DEFAULT_MODEL is v9-m or v9-s, and does not happen when using either v9-c or v7. Tracing the problem to the yolo code yielded no results, so i am asking here in case this is an oversight on my part.
To Reproduce
This is the relevant code. No other part of my code is interfacing with the yolo module. I believe copying and pasting this will yield the exact same result.
Expected behavior
I would expect the issue to arise either on all model sizes or in none of them.
System Info (please complete the following ## information):
The text was updated successfully, but these errors were encountered: